From 5c89d7bed1fb3ad5ed6c2b92d557273e695aca2f Mon Sep 17 00:00:00 2001 From: John Corser Date: Sat, 14 Nov 2026 22:27:02 -0500 Subject: [PATCH] ci: run lint, tests, build and a Docker build on PRs and main Until now the only workflow was the tag-triggered release, so nothing checked PRs before merge. --- .github/workflows/ci.yml | 60 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 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..8be7683 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,60 @@ +name: CI + +on: + pull_request: + push: + branches: [main] + +concurrency: + group: ci-${{ github.ref }} + cancel-in-progress: true + +jobs: + test: + name: Lint, test, build + runs-on: ubuntu-latest + timeout-minutes: 15 + steps: + - name: Checkout + uses: actions/checkout@v7 + + - name: Setup Node.js + uses: actions/setup-node@v7 + with: + node-version: '22' + cache: 'npm' + + - name: Install dependencies + run: npm ci + env: + HUSKY: 0 + + - name: Lint + run: npm run lint + + - name: Test + run: npm test + + - name: Build + run: npm run build + + docker: + name: Docker build + runs-on: ubuntu-latest + timeout-minutes: 30 + steps: + - name: Checkout + uses: actions/checkout@v7 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v4 + + # amd64 only: catches broken Dockerfile/pipx installs without the slow QEMU arm64 build. + - name: Build image + uses: docker/build-push-action@v7 + with: + context: . + push: false + platforms: linux/amd64 + cache-from: type=gha + cache-to: type=gha,mode=max