Repository navigation
Run the vitest suite in CI - #2
Merged
Merged
Conversation
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 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
CI only built the Docker image and checked
/,/playground, and/embed, so the ~26 vitest files undersrc/never ran on a pull request. This adds a Tests workflow (.github/workflows/test.yml) that runsnpm test(vitest run).main,pull_request, andworkflow_dispatch, withpermissions: contents: read.actions/setup-node@v7.1.0withcache: npm. Actions are pinned to exact versions, as indocker.yml.npm ci. The npm 10 bundled with Node 22 rejects the npm 11 lockfile (see the Dockerfile).The job is separate from the Docker image job, so test failures and image build failures show up as separate checks.
Test plan
🤖 Generated with Claude Code