Skip to content

Commit 884fdb9

Browse files
fix: address codecov configuration issues
- Create coverage directory before pytest runs to ensure junit xml output succeeds - Fix codecov upload file paths (coverage.xml and coverage/lcov.info) - Configure jest-junit to output to coverage/junit.xml explicitly - Set coverageDirectory to ./coverage for consistency Addresses CodeRabbit review comments.
1 parent d02171e commit 884fdb9

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ jobs:
4444
set -eux
4545
python -m pip install .[test]
4646
47+
mkdir -p coverage
4748
pytest -vv -r ap --cov jupyterlab_deepnote --cov-report=xml --junit-xml=coverage/pytest-results.xml
4849
jupyter server extension list
4950
jupyter server extension list 2>&1 | grep -ie "jupyterlab_deepnote.*OK"
@@ -58,7 +59,7 @@ jobs:
5859
uses: codecov/codecov-action@v5
5960
with:
6061
token: ${{ secrets.CODECOV_TOKEN }}
61-
files: ./coverage.xml,./coverage/lcov.info
62+
files: coverage.xml,coverage/lcov.info
6263
fail_ci_if_error: false
6364

6465
- name: Upload test results to Codecov

jest.config.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,12 @@ module.exports = {
2222
'!src/**/*.d.ts',
2323
'!src/**/.ipynb_checkpoints/*'
2424
],
25+
coverageDirectory: './coverage',
2526
coverageReporters: ['lcov', 'text'],
26-
reporters: ['default', 'jest-junit'],
27+
reporters: [
28+
'default',
29+
['jest-junit', { outputDirectory: './coverage', outputName: 'junit.xml' }]
30+
],
2731
testRegex: 'src/.*/.*.spec.ts[x]?$',
2832
transformIgnorePatterns: [`/node_modules/(?!${esModules}).+`]
2933
};

0 commit comments

Comments
 (0)