| name: opencode-provider CI | |
| on: | |
| push: | |
| branches: [main, release/v3.8.0] | |
| paths: | |
| - "@omniroute/opencode-provider/**" | |
| pull_request: | |
| branches: [main, release/v3.8.0] | |
| paths: | |
| - "@omniroute/opencode-provider/**" | |
| types: [opened, synchronize, reopened, ready_for_review] | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| defaults: | |
| run: | |
| working-directory: "@omniroute/opencode-provider" | |
| jobs: | |
| test: | |
| name: Test (Node ${{ matrix.node }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| node: ["20", "22", "24"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: ${{ matrix.node }} | |
| cache: npm | |
| cache-dependency-path: "@omniroute/opencode-provider/package-lock.json" | |
| - run: npm ci | |
| - run: npm test | |
| build: | |
| name: Build | |
| runs-on: ubuntu-latest | |
| needs: test | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: "20" | |
| cache: npm | |
| cache-dependency-path: "@omniroute/opencode-provider/package-lock.json" | |
| - run: npm ci | |
| - run: npm run build | |
| - uses: actions/upload-artifact@v7 | |
| with: | |
| name: opencode-provider-dist | |
| path: "@omniroute/opencode-provider/dist" | |
| retention-days: 7 | |