fix CI #28
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: [main, trunk] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| build-lint-test: | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] | |
| node-version: [20, 22] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - name: Install tmux (macOS) | |
| if: runner.os == 'macOS' | |
| run: brew install tmux | |
| - run: npm ci | |
| - run: npx tsc --build | |
| - run: npx eslint . | |
| - name: Unit tests | |
| run: npm test | |
| - name: E2E tests (sessions) | |
| run: npx tsx --test 'packages/cli/test/e2e/sessions.e2e.ts' | |
| - name: Install opencode | |
| run: npm install -g opencode-ai | |
| - name: E2E tests (opencode) | |
| run: npx tsx --test 'packages/cli/test/e2e/opencode.e2e.ts' | |
| e2e-docker: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| - run: npm ci | |
| - run: npx tsc --build | |
| - name: E2E tests (sandbox with Docker) | |
| run: npx tsx --test 'packages/cli/test/e2e/sandbox-engines.e2e.ts' | |
| e2e-podman: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| - name: Install Podman | |
| run: sudo apt-get update && sudo apt-get install -y podman | |
| - run: npm ci | |
| - run: npx tsc --build | |
| - name: E2E tests (sandbox with Podman) | |
| run: npx tsx --test 'packages/cli/test/e2e/sandbox-engines.e2e.ts' | |
| e2e-colima: | |
| runs-on: macos-latest | |
| # Colima needs nested virtualization which macOS CI runners don't reliably support. | |
| continue-on-error: true | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| - name: Install Colima | |
| run: brew install colima docker | |
| - name: Start Colima | |
| run: colima start --runtime docker || echo "Colima VM failed to start (expected on some CI runners)" | |
| - run: npm ci | |
| - run: npx tsc --build | |
| - name: E2E tests (sandbox with Colima) | |
| run: | | |
| if colima status 2>/dev/null; then | |
| npx tsx --test 'packages/cli/test/e2e/sandbox-engines.e2e.ts' | |
| else | |
| echo "Skipping: Colima is not running" | |
| fi |