ci(tests): run the Oh My Pi compatibility suite as a required check

tests/test-omp-compat.mjs skipped whenever omp was not on PATH, which
was always the case in CI, so 0.6.1 shipped an import that pi's compat
entrypoint provides but OMP's bundled pi-ai does not (#74).

Add an omp-compat job that installs @oh-my-pi/pi-coding-agent with Bun
and runs the suite with OMP_COMPAT_REQUIRED=1, which turns the skip into
a failure. Add a first phase that loads the extension through
`omp models -e`, the same loader `omp plugin install` validates with;
it fails on the 0.6.1 index.ts and passes with the runtime resolution.
This commit is contained in:
Patrick Wozniak
2026-09-02 10:14:59 +02:00
parent 9b91e5468e
commit caa4e8e274
4 changed files with 57 additions and 0 deletions
+27
View File
@@ -34,6 +34,33 @@ jobs:
- run: npm ci
- run: npm run format:check
# ──────────────────────────────────────────────────────────
# Oh My Pi host compatibility — real omp binary, mock API
# ──────────────────────────────────────────────────────────
omp-compat:
name: Oh My Pi compatibility
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- run: npm ci
- name: Install Oh My Pi
run: |
npm install -g @oh-my-pi/pi-coding-agent@latest
echo "OMP_BIN=$(npm prefix -g)/bin/omp" >> "$GITHUB_ENV"
- name: Verify omp starts
run: '"$OMP_BIN" --version'
- name: Run OMP compatibility suite
env:
OMP_COMPAT_REQUIRED: "1"
run: node tests/test-omp-compat.mjs
# ──────────────────────────────────────────────────────────
# Code-level vulnerability scanning (SAST)
# ──────────────────────────────────────────────────────────