Fix false Codecov project coverage drops by uploading R and JS reports together (#254) - #344
Fix false Codecov project coverage drops by uploading R and JS reports together (#254)#344Nishita-shah1 wants to merge 11 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #344 +/- ##
=======================================
Coverage 73.07% 73.07%
=======================================
Files 165 165
Lines 8933 8933
=======================================
Hits 6528 6528
Misses 2405 2405
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
@ANAMASGARD please review? |
There was a problem hiding this comment.
@Nishita-shah1 the combined coverage upload approach looks correct for #254. I left a few inline comments
after these changes, could you please verify one failure case where either coverage job fails and the Codecov upload is skipped, followed by a docs-only/no-code-change run showing 0.00% project coverage change? that would confirm #254 end-to-end.
| @@ -1,4 +1,5 @@ | |||
| acontext("render animint in pdf") | |||
| skip_if_not(nzchar(Sys.which("pdflatex")), "pdflatex not available") | |||
There was a problem hiding this comment.
@Nishita-shah1 after removing Texlive from the coverage jobs, this test skips there. The CRAN job has Texlive, but build.sh uses filter="compiler", so this renderer test is not selected there either.
could we please keep this test running in at least one CI job, so the coverage test scope remains consistent with master?
Co-authored-by: Gauarv Chaudhary <137998824+ANAMASGARD@users.noreply.github.com>
Co-authored-by: Gauarv Chaudhary <137998824+ANAMASGARD@users.noreply.github.com>
| - name: run PDF renderer test | ||
| run: Rscript -e 'testthat::test_file("tests/testthat/test-renderer3-knit-print-pdf.R")' | ||
|
|
||
| - name: run CRAN build | ||
| run: bash build.sh |
There was a problem hiding this comment.
sorry, my earlier suggestion missed the normal test setup. test_file() sources the helpers directly, but animint2 is not loaded, so toRGB() is unavailable. could we load the same packages as tests/testthat.R before running this test?
| - name: run PDF renderer test | |
| run: Rscript -e 'testthat::test_file("tests/testthat/test-renderer3-knit-print-pdf.R")' | |
| - name: run CRAN build | |
| run: bash build.sh | |
| - name: run PDF renderer test | |
| run: Rscript -e 'library(testthat); library(animint2); library(XML); test_file("tests/testthat/test-renderer3-knit-print-pdf.R")' | |
| - name: run CRAN build | |
| run: bash build.sh |
|
Sir @tdhock the PR now looks good can you please give it a last review before merge . |
Fixes #254
Summary
projectwas failing on documentation-only commits because R and JS coverage were uploaded separately. If the JS job failed, an R-only report became the baseline, so the next full R+JS upload looked like a coverage drop.Test plan
R_coverageandJS_coveragein parallel, thenUpload combined coverage to Codecov.patchandprojectshould not fail just because one coverage job failed on a previous commit.