From 1cfa0b7a1d26ab3b54ff1e09d413b1ce63adcd96 Mon Sep 17 00:00:00 2001 From: Endri Bezati Date: Thu, 3 Sep 2026 20:13:01 +0200 Subject: [PATCH] ci: run the tests, the build, and the neutrality gates on every push There was no workflow, so 851 tests and four gates ran only where someone remembered to run them. The gates are the part worth having automated. Product-neutrality is the rule the whole architecture rests on, it is enforced by a script rather than by review precisely because a well-meaning change reintroduces it easily, and a green test suite says nothing at all about whether it still holds. Node is pinned to the version in the Volta block rather than left as "22", because a build that passes on a Node nobody develops against is a build that proves less than it appears to. --- .github/workflows/ci.yml | 52 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 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..981cb14 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,52 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + workflow_dispatch: + +# A second push to a branch cancels the first: the only answer worth waiting for +# is whether the current tip works. +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + test: + runs-on: ubuntu-latest + timeout-minutes: 20 + + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + # The version Volta pins in package.json. A mismatch here would let a + # build pass on a Node nobody develops against. + node-version: '22.23.1' + cache: npm + + - run: npm ci + + - name: Build + run: npm run build + + - name: Test + run: npm test + + - name: Neutrality gates + # The rule the whole architecture rests on: no consumer vocabulary in + # the core packages. It is enforced by a script precisely because it is + # the kind of thing a well-meaning change reintroduces, and a green + # test suite says nothing about it. + run: npm run check:neutrality + + - name: Package + run: npm run package + + - uses: actions/upload-artifact@v4 + with: + name: dialogram-vsix + path: '*.vsix' + if-no-files-found: error