Repository navigation
Conversation
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.
c2fd82a to
6202423
Compare
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.
What this PR does
Lets
ci-test-js.ymlrun Vitest as well as Jest, so a project whosetest:jsscript runs Vitest can use the shared workflow. Jest stays the default, so callers that don't set the new input see no change.Closes
Part of #51: the
ci-test-jsgap "Jest hardcoded, while@wordpress/scripts36 defaults to Vitest".Changes
ci-test-js.ymlgainstest-runner:jestorvitest, default""(Jest). A newResolve test runnerstep fails the job with an error for any other value.vitest, the default command isnpm run test:js --, without Jest's--ci(Vitest readsCIfrom the environment). The Jest cache steps are skipped and no--cacheDirectoryis appended, soenable-cacheis ignored.jestor empty, the command, cache and appended--cacheDirectoryare the same as before.Jestby default,Vitestonly when a caller setsvitest. TheRun Jeststep is nowRun tests.wp-ci.ymlgainstest-js-runnerand forwards it totest-js. Thetest-js-commandandtest-js-cachedescriptions now cover both runners.examples/ci-test-js.ymlshowstest-runner. The README setup line and index row say "Jest or Vitest", and the README now says how to switch.How I verified
Acceptance criteria
Runtime behavior
test-runnerempty: a consumer run uses the same command, cache andJestcheck name as beforetest-js-runner: vitesttest-runnervalue failsResolve test runnerCode quality
Housekeeping
CHANGELOG.mdfrom itexamples/<workflow>.ymladded or updated to match any input changeyamllint,actionlintandbin/check-workflows.shpass locallyReviewer notes
Jestcheck and switches tovitesthas to requireVitestinstead.test-command, so a custom command doesn't need to forward"$@".Conventions: AGENTS.md · PR process: CONTRIBUTING.md