Commit f18bc9c
feat: add codecov integration with test results upload (#13)
* feat: add codecov integration with test results upload
- Add .codecov.yml configuration with project and patch coverage checks (0.05% threshold)
- Configure jest to output test results in JUnit XML format using jest-junit reporter
- Update pytest to output coverage in XML format and test results in JUnit XML format
- Add codecov/codecov-action@v5 step to upload coverage from both jest (lcov) and pytest (xml)
- Add codecov/test-results-action@v1 step to upload test results from both test suites
- Set fail_ci_if_error: false for coverage upload to prevent blocking CI if codecov has issues
- Use if: '!cancelled()' for test results upload to ensure results are uploaded even if tests fail
Follows the same codecov configuration pattern as deepnote-internal and deepnote-toolkit repos.
Note: CODECOV_TOKEN secret needs to be configured in repository settings for codecov uploads to work.
* 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.
* ci: fail job on upload failure
* fix: set test results upload to fail CI on error
Add fail_ci_if_error: true to test results upload step to ensure CI fails when codecov upload fails, matching the coverage upload configuration.
---------
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>1 parent 7ac4a8e commit f18bc9c
3 files changed
+32
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
| 48 | + | |
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
| |||
54 | 55 | | |
55 | 56 | | |
56 | 57 | | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
57 | 73 | | |
58 | 74 | | |
59 | 75 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
26 | 31 | | |
27 | 32 | | |
28 | 33 | | |
0 commit comments