From 87e43a5070b74b9452ed2e1b63774b47cd38a61c Mon Sep 17 00:00:00 2001 From: Leslie Owusu-Appiah Date: Fri, 29 May 2026 18:09:09 +0200 Subject: [PATCH] ci: typecheck + lint + test on push/PR to develop MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes #8. GitHub Actions workflow guarding the publishable library surface. Runs tsc --noEmit, eslint src, and jest on every push to develop and every PR targeting it. Scoped to the library only: installs root-only via `npm ci --workspaces=false`, skipping the example/* workspaces and their heavy native deps (Expo, react-native-macos, Skia) which need a Mac + provisioning to build. The examples' build health stays a manual on-device check; CI guards what actually ships to npm. Node 20 (matches package.json engines), npm cache keyed on the committed lockfile, concurrency-cancel on superseded pushes. Validated locally against a root-only install before commit — all three checks green (38 tests pass, 0 lint errors). --- .github/workflows/ci.yml | 46 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 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..5ad5e4d --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,46 @@ +name: CI + +# Typecheck + lint + test the library on every push to develop and every PR +# targeting it. Scoped to the library only (src/) — the example apps under +# example/* are npm workspaces with heavy native deps (Expo, react-native-macos, +# Skia) that need a Mac and provisioning to build, so CI installs root-only +# (`--workspaces=false`) and never touches them. Their build health is verified +# manually on-device; this workflow guards the publishable surface. + +on: + push: + branches: [develop] + pull_request: + branches: [develop] + +# Cancel superseded runs on the same ref so a rapid push sequence doesn't +# queue redundant work. +concurrency: + group: ci-${{ github.ref }} + cancel-in-progress: true + +jobs: + check: + name: typecheck · lint · test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: 20 + cache: npm + + # Root package only — skip the example/* workspaces and their native + # deps. The lockfile is committed, so `npm ci` is reproducible. + - name: Install (library only) + run: npm ci --workspaces=false + + - name: Typecheck + run: npm run typecheck + + - name: Lint + run: npm run lint + + - name: Test + run: npm test