Skip to content

Commit ca264af

Browse files
ggazzoclaude
andcommitted
fix: separate Jest and nyc coverage outputs to fix Codecov upload
Jest and nyc were both writing to `coverage/lcov.info`, causing nyc to overwrite Jest output. Now each writes to its own subdirectory and the codecov action explicitly uploads both files. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 4364222 commit ca264af

3 files changed

Lines changed: 3 additions & 1 deletion

File tree

.github/workflows/ci-test-unit.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,4 @@ jobs:
5151
flags: unit
5252
verbose: true
5353
token: ${{ secrets.CODECOV_TOKEN }}
54+
files: apps/meteor/coverage/jest/lcov.info,apps/meteor/coverage/nyc/lcov.info

apps/meteor/jest.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,5 @@ export default {
5555
],
5656
coverageProvider: 'v8',
5757
collectCoverage: true,
58+
coverageDirectory: 'coverage/jest',
5859
} satisfies Config;

apps/meteor/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
".testunit:definition": "mocha --config ./.mocharc.definition.js",
2727
".testunit:jest": "TZ=UTC TS_NODE_COMPILER_OPTIONS='{\"allowJs\": false}' jest",
2828
".testunit:server": "mocha --config ./.mocharc.js",
29-
".testunit:server:cov": "nyc -r text -r lcov mocha --config ./.mocharc.js",
29+
".testunit:server:cov": "nyc --report-dir coverage/nyc -r text -r lcov mocha --config ./.mocharc.js",
3030
"build:ci": "METEOR_DEBUG_BUILD=1 METEOR_DISABLE_OPTIMISTIC_CACHING=1 meteor build --verbose --server-only --directory /tmp/dist",
3131
"coverage": "TS_NODE_COMPILER_OPTIONS='{\"module\": \"commonjs\"}' nyc -r html mocha --config ./.mocharc.js",
3232
"debug": "meteor run --inspect",

0 commit comments

Comments
 (0)