ci: bump setup-node@v5, add Discord release announcements #258
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [master, main] | |
| pull_request: | |
| env: | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true | |
| # Pipeline shape on every push to master and on every PR: | |
| # | |
| # check-plugin, check-pi-plugin (unit tests + lint + typecheck, parallel) | |
| # ↓ | |
| # e2e-opencode, e2e-pi (Docker e2e, parallel — gated by unit tests) | |
| # | |
| # Docker e2e was previously in a separate workflow (e2e-docker.yml) that | |
| # ran in parallel with this one, so an e2e-only regression could merge | |
| # while CI showed green. Folding e2e here means PRs and master pushes | |
| # block on a full unit+e2e cycle. | |
| jobs: | |
| check-plugin: | |
| name: Check (plugin) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - name: Install dependencies | |
| run: bun install | |
| - name: TypeScript typecheck | |
| run: bun run typecheck | |
| - name: Lint | |
| run: bun run lint | |
| - name: Build | |
| run: bun run build | |
| - name: Test | |
| run: bun run test | |
| check-pi-plugin: | |
| name: Check (pi-plugin) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - name: Install dependencies | |
| run: bun install | |
| - name: TypeScript typecheck | |
| run: bun run --cwd packages/pi-plugin typecheck | |
| - name: Lint | |
| run: bun run --cwd packages/pi-plugin lint | |
| - name: Build | |
| run: bun run --cwd packages/pi-plugin build | |
| - name: Test | |
| run: bun run --cwd packages/pi-plugin test | |
| e2e-opencode: | |
| name: E2E (OpenCode, Docker) | |
| runs-on: ubuntu-latest | |
| needs: [check-plugin] | |
| timeout-minutes: 25 | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - name: Install workspace deps | |
| run: bun install --frozen-lockfile | |
| - name: Build OpenCode plugin | |
| run: bun run --cwd packages/plugin build | |
| - name: Build CLI | |
| # The CLI is its own package (@cortexkit/magic-context) since | |
| # v0.16.1; Dockerfile.opencode COPYs packages/cli/dist/ in. | |
| run: bun run --cwd packages/cli build | |
| - name: Build E2E image | |
| run: | | |
| docker build \ | |
| --platform linux/amd64 \ | |
| -f tests/docker/Dockerfile.opencode \ | |
| -t mc-e2e-opencode \ | |
| . | |
| - name: Run E2E | |
| run: docker run --rm --platform linux/amd64 mc-e2e-opencode | |
| e2e-pi: | |
| name: E2E (Pi, Docker) | |
| runs-on: ubuntu-latest | |
| needs: [check-pi-plugin] | |
| timeout-minutes: 25 | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - name: Install workspace deps | |
| run: bun install --frozen-lockfile | |
| - name: Build Pi plugin | |
| run: bun run --cwd packages/pi-plugin build | |
| - name: Build CLI | |
| # The CLI moved to its own package (@cortexkit/magic-context) in | |
| # v0.16.1. Dockerfile.pi COPYs packages/cli/dist/ in for the | |
| # `magic-context doctor --harness pi` test invocation. | |
| run: bun run --cwd packages/cli build | |
| - name: Build E2E image | |
| # The Pi Dockerfile installs runtime deps fresh inside the image | |
| # (better-sqlite3 builds against linux/amd64), so no host-side | |
| # `npm install` is needed. | |
| run: | | |
| docker build \ | |
| --platform linux/amd64 \ | |
| -f tests/docker/Dockerfile.pi \ | |
| -t mc-e2e-pi \ | |
| . | |
| - name: Run E2E | |
| run: docker run --rm --platform linux/amd64 mc-e2e-pi |