[PR #124·126] Putting the Server-Backed App Test into CI and Keeping It Out of Windows Runs
This post bundles two small PRs about one question: are the tests actually running where they should?
- What was done: Both PRs are about the customer app’s
e2e:app(7 tests that start a real server and check the order in which the app talks to it). PR #124 added it to CI (the automatic test runner that checks code when it is pushed). PR #126 stopped the same tests from being pulled into the ordinarynpm teston my Windows computer, where they failed.
At a glance
| PR #124 | PR #126 | |
|---|---|---|
| Problem | e2e:app had never run in CI |
7 server tests slipped into npm test on Windows and failed |
| Fix | New workflow file e2e-app.yml |
Dropped <rootDir> from the exclude pattern |
| Decisions and requests | I requested the .github/ change and a separate file structure |
(Claude confirmed with a test listing) |
| Check | Same commit passed twice in CI | npx jest passed 138 tests twice |
PR #124: Putting a test that never ran into CI
- Problem:
npm run e2e:app, built in PR #119, was left out ofverify(the command that runs tests and the build together) and was not called by the existinge2ejob (a separate group of checks in CI), so it had never run in CI. A later PR could break that sequence in the server or the app API and CI could still be green (passing). - What was done: At my direct request, a new workflow file (the file that lists CI steps)
e2e-app.ymlwas created under.github/. Its steps are: check out the code, set up Node 24.19.0, install packages, and runnpm run e2e:app, with a 15-minute limit. It needs no secrets: Kakao and Apple sign-in are faked, and the database is started temporarily with Docker on the CI machine. - Choice made: A separate workflow file. It runs alongside the existing checks, so the total wait barely grows; re-running
verifydoes not cancel it; and it can be started by hand to run only this test. The first version attached it toverify.ymlas a job, and I asked for a separate file structure instead. - Alternatives dropped: Adding it as a step inside the
e2ejob was dropped, because both tests compile into the same folder and could collide when they overlap in one job. Making it a required pre-merge check right away was also dropped: if it is unstable, every PR gets blocked, so it first has to pass several runs in a row, like the existinge2e.
PR #126: Keeping the test out of Windows runs
- Problem: When Claude ran
npm run verifyon my Windows computer, the 7 tests inintegration/api-order.test.tsfailed withE2E_APP_SERVER_URL is required. They need a real server, so they were meant to be excluded from the ordinarynpm test. But the exclude pattern'<rootDir>/integration/'does not match on this Windows path, so they slipped in. - The fix: One line in
apps/app/jest.config.js: the pattern became'/integration/'. - Choice made: Drop
<rootDir>(a placeholder for the project folder) from the pattern. Claude usedjest --listTests(an option that only lists which test files are picked up) to confirm that, with the same settings,<rootDir>/integration/fails to exclude and/integration/succeeds. It has the same shape as the existing/node_modules/pattern, and the app has only oneintegration/folder. - Alternative dropped: Writing a Windows-specific path separator, because it could break the Linux CI.
How it was checked
- PR #124: The same commit ran twice in CI and passed both times in under two minutes. I re-ran the second one myself.
- PR #126: The
--listTestsoutput no longer includes the integration file. Claude rannpx jesttwice inapps/app, and all 138 tests passed. On the first run in a fresh folder the cache was empty, and five screen-test files exceeded the 5-second limit once. That was the same effect seen in PR #123, and the next two runs passed.
What was not confirmed
- Whether the new workflow file can be started by hand before it lands on
main. - Whether the server compile wait (up to 240 seconds) and the test limit (60 seconds) are always stable on the CI machine. That is unknown until it has been run.
- Why the
<rootDir>pattern fails on this Windows path. The only guess is that the folder with a dot in its name (.claude) is involved.
What I took from it
- Check where a test runs, not only that it exists. A test that CI never calls will not tell anyone when it breaks.
- Verify an exclude pattern by listing, not by assuming.
--listTestsshows right away whether the pattern really matches. - Run a check several times before making it required. An unstable required check blocks every PR.