Sudden codecov drop when using github actions

I have searched for similar issues and found this - Sudden significant coverage drop but I could not use the solution they found in my code.


The code coverage of a project has dropped by 93% but there are not corresponding changes to the tests or R code. This went unnoticed for some time but in checking the commits there isn’t and obvious reason why the coverage would plummet as it has.

Commit SHAs

At this commit 6b5f93a everything was fine.

at this commit it dropped by 93% 38e5de2 - here is the change on github - try out github actions CI by goldingn · Pull Request #332 · greta-dev/greta · GitHub


CI/CD or Build URL

I am using github actions,
the link where coverage is being uploaded is Actions · greta-dev/greta · GitHub


Github actions

Codecov Output

From the github actions link (apologies if this is not what is meant - I couldn’t find the codecov ascii mentioned

Run covr::codecov()
  shell: /usr/local/bin/Rscript {0}
    GITHUB_PAT: ***
    R_LIBS_USER: /home/runner/work/_temp/Library
    TZ: UTC
    NOT_CRAN: true

files differ in number of lines:
< Warning message:
< In spelling::spell_check_test(vignettes = TRUE, error = FALSE, skip_on_cran = TRUE) :
<   Failed to find package source directory
> All Done!
[1] "Coverage reports upload successfully"

[1] TRUE

[1] TRUE

[1] "c72fe260-ac7d-4534-9a51-b2e142b894aa"

[1] ""

Expected Results

Coverage to stay at a similar number - 93-5%

Actual Results

Coverage dropped to 1%

Additional Information

Here is the codecov YAML

comment: false

        target: auto
        threshold: 1%
        informational: true
        target: auto
        threshold: 1%
        informational: true

@njtierney sorry for the delay here. I took a look at the coverage report uploaded in one of the 1% reports, and it mostly is showing null or 0 which implies that those lines aren’t hit. My guess is that this is something with your CI that changed or a race condition. I’m sorry I can’t be more helpful here, but Codecov is displaying the coverage as uploaded.