test.yml came with the V2 skeleton (d191fde) and triggers only on
feature/development-v2, a branch that no longer exists, so it has never
run on a V2 PR. The only test gate has been the local pre-push hook.
- Trigger on pull_request and push for v2-dev, v2-staging and v2-beta.
- Run npm test instead of npm run test:coverage. CI is there to run the
tests; the 100% coverage threshold fails on v2-dev today (99.97%,
pre-existing gaps in 13 files) and would turn every PR red.
- walkFileSystem now yields each directory's entries in name order.
fs.promises.opendir returns them in disk order, which is alphabetical
on macOS but not on Linux, so functions:serve listed (and registered)
functions in an OS-dependent order. The first CI run on Linux failed
the cloud-functions test that expects "λ /a" before "λ /b".
The tests need no live project, environment, deployment or secrets: the
API is mocked or served by a local test server and
test/credential-guard.setup.ts fakes the login.
#claude_code#
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
What
Jira: CL-8999
.github/workflows/test.ymlcame with the V2 skeleton (d191fde) but triggers only onfeature/development-v2, a branch that no longer exists. It has never run on a V2 PR, so the local pre-push hook has been the only test gate.pull_requestandpushonv2-dev,v2-stagingandv2-beta.npm testinstead ofnpm run test:coverage. CI is there to run the tests. The 100% coverage threshold fails onv2-devtoday (99.97%, existing gaps in 13 files), so it would fail every PR.walkFileSystemsorts each directory's entries by name (src/functions/os-helper.ts).fs.promises.opendirreturns entries in disk order, which is alphabetical on macOS but not on Linux. Sofunctions:servelisted and registered functions in an order that depended on the OS. The first CI run on Linux failed thecloud-functionstest that expectsλ /abeforeλ /b.The tests need no live project, environment, deployment or secrets. The API is mocked or served by a local test server, and
test/credential-guard.setup.tsfakes the login. Live behaviour stays the E2E sanity suite's job.Tests
os-helpertest fakes the file system returningb.jsbeforea.jsand asserts thata.jscomes out first. It fails without the sort, on macOS too, and passes with it.v2-dev@ 8899a3e:npm ci,npm run lintandnpm run buildpass.npm testpasses: 201 suites, 4116 tests.testcheck on this PR passes on GitHub'subuntu-latestrunner.#claude_code#
🤖 Generated with Claude Code