From 8786a6857f3aac5a3ecf0710ed47d89a1fed0b7c Mon Sep 17 00:00:00 2001 From: ActivistChecklist Date: Sat, 19 Sep 2026 09:26:22 -0700 Subject: [PATCH] Run typecheck, tests, and build on pull requests release.yml only triggers on push to main, so yarn test ran after a merge had already landed rather than before. A broken commit was caught only once it was on main and mid-publish, which is how the failed run for "chore: version packages" (#8) surfaced. This adds a CI workflow on pull_request so the same checks gate the merge instead of trailing it. It also runs yarn build, which prepack invokes at publish time: a build break would otherwise stay invisible until the release run. Concurrency is scoped per ref with cancel-in-progress, so a new push to a PR supersedes the run it obsoletes. Co-Authored-By: Claude Opus 5 --- .github/workflows/ci.yml | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..1f41cb1 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,40 @@ +name: CI + +on: + pull_request: + +permissions: + contents: read + +# A new push to a PR makes the in-flight run obsolete; cancel it. +concurrency: + group: ci-${{ github.ref }} + cancel-in-progress: true + +jobs: + verify: + name: Typecheck, test, build + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: 24 + cache: yarn + + - name: Install dependencies + run: yarn install --frozen-lockfile + + - name: Typecheck + run: yarn typecheck + + - name: Run tests + run: yarn test + + # prepack runs this on publish, so a build break would otherwise + # only surface during the release run, after the merge has landed. + - name: Build + run: yarn build