From ffd2fdb3954274887050e007cc4e4d7f0c6a9b2d Mon Sep 17 00:00:00 2001 From: PytechNo <63828779+PytechNo@users.noreply.github.com> Date: Fri, 16 Oct 2026 12:56:07 -0400 Subject: [PATCH] Run the vitest suite in CI A new Tests workflow runs `npm test` on pushes to main, pull requests, and manual dispatch. Until now CI only built the Docker image and checked its routes, so the vitest suite never ran on a pull request. The job uses Node 22 with a cached npm download directory and installs npm 11 before `npm ci`, because the npm 10 bundled with Node 22 rejects the npm 11 lockfile. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/test.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..9e0a6ca --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,30 @@ +name: Tests + +on: + push: + branches: [main] + pull_request: + workflow_dispatch: + +permissions: + contents: read + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v7.0.1 + with: + persist-credentials: false + - uses: actions/setup-node@v7.1.0 + with: + node-version: 22 + cache: npm + # package-lock.json is written by npm 11, and the npm 10 bundled with + # Node 22 rejects it in `npm ci` (see the Dockerfile). + - name: Install npm 11 + run: npm install -g npm@11 + - name: Install dependencies + run: npm ci + - name: Run tests + run: npm test