From 366acba1e246d3c4e85e2624ddeb7646e09fafb1 Mon Sep 17 00:00:00 2001 From: Daniel Kanas Date: Wed, 5 Aug 2026 21:55:43 +0200 Subject: [PATCH] Add CI workflow Runs typecheck, lint, format check, tests and build on pushes to main and on pull requests. Superseded runs for the same ref are cancelled. Adds a fmt:check script so CI verifies formatting without rewriting files, and makes lint fail on warnings rather than only on errors. Co-Authored-By: Claude Opus 5 --- .github/workflows/ci.yml | 35 +++++++++++++++++++++++++++++++++++ package.json | 3 ++- 2 files changed, 37 insertions(+), 1 deletion(-) 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..936067b --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,35 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + +concurrency: + group: ci-${{ github.ref }} + cancel-in-progress: true + +jobs: + verify: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: pnpm/action-setup@v4 + + - uses: actions/setup-node@v4 + with: + node-version: 24 + cache: pnpm + + - run: pnpm install --frozen-lockfile + + - run: pnpm run check + + - run: pnpm run lint + + - run: pnpm run fmt:check + + - run: pnpm test + + - run: pnpm run build diff --git a/package.json b/package.json index f0c3b58..a240e5f 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,8 @@ "check": "tsgo -p tsconfig.json", "dev": "vite build --watch", "fmt": "oxfmt", - "lint": "oxlint", + "fmt:check": "oxfmt --check", + "lint": "oxlint --deny-warnings", "test": "vitest run", "prepublishOnly": "pnpm build" },