| 1 | name: CI |
| 2 | |
| 3 | # Deploy waits for this workflow to pass on main. The end-to-end suite is its own |
| 4 | # workflow (e2e.yml), so deploys don't wait for it too. |
| 5 | |
| 6 | on: |
| 7 | push: |
| 8 | branches: [main] |
| 9 | pull_request: |
| 10 | |
| 11 | permissions: |
| 12 | contents: read |
| 13 | |
| 14 | concurrency: |
| 15 | group: ci-${{ github.ref }} |
| 16 | cancel-in-progress: true |
| 17 | |
| 18 | jobs: |
| 19 | check: |
| 20 | name: Typecheck and test |
| 21 | runs-on: ubuntu-latest |
| 22 | timeout-minutes: 20 |
| 23 | steps: |
| 24 | - uses: actions/checkout@v4 |
| 25 | - uses: pnpm/action-setup@v4 |
| 26 | - uses: actions/setup-node@v4 |
| 27 | with: |
| 28 | node-version: 22 |
| 29 | cache: pnpm |
| 30 | - run: pnpm install --frozen-lockfile |
| 31 | - name: Build |
| 32 | run: pnpm -r --if-present build |
| 33 | - name: Typecheck |
| 34 | run: pnpm -r --if-present typecheck |
| 35 | - name: Unit tests |
| 36 | run: pnpm -r --if-present test |
| 37 | - name: Bundle the Worker (dry run) |
| 38 | working-directory: apps/diffinery |
| 39 | run: pnpm exec wrangler deploy --dry-run --env dev --outdir dist |