# Sudden codecov drop when using github actions

**URL:** https://community.codecov.com/t/sudden-codecov-drop-when-using-github-actions/2849
**Category:** Bug Fixes
**Tags:** r, github
**Created:** [May 4, 2021, 2:25am UTC](https://community.codecov.com/t/sudden-codecov-drop-when-using-github-actions/2849 "2021-05-04T02:25:34Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![njtierney](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/njtierney/32/1835_2.png) [@njtierney](https://community.codecov.com/u/njtierney)
#### Post date: [May 4, 2021, 2:25am UTC](https://community.codecov.com/t/sudden-codecov-drop-when-using-github-actions/2849/1 "2021-05-04T02:25:34Z")

</div>

I have searched for similar issues and found this - [Sudden significant coverage drop](https://community.codecov.com/t/sudden-significant-coverage-drop/1610) but I could not use the solution they found in my code.

### Description

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`](https://codecov.io/gh/greta-dev/greta/commit/6b5f93a36ae3799f60bb086cf71528ff5980e1e1) everything was fine.

at this commit it dropped by 93% [`38e5de2`](https://codecov.io/gh/greta-dev/greta/commit/38e5de2ab3e3d76b3f26c45986cf6f78e9b06471) - here is the change on github - [try out github actions CI by goldingn · Pull Request #332 · greta-dev/greta · GitHub](https://github.com/greta-dev/greta/pull/332/files?file-filters%5B%5D=.yml)

### Repository

> **[GitHub - greta-dev/greta: simple and scalable statistical modelling in R](https://github.com/greta-dev/greta)**
>
> simple and scalable statistical modelling in R

### CI/CD or Build URL

I am using github actions,  
the link where coverage is being uploaded is [test-coverage.yaml · Workflow runs · greta-dev/greta · GitHub](https://github.com/greta-dev/greta/actions/workflows/test-coverage.yaml)

### Uploader

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

```auto
Run covr::codecov()
  covr::codecov()
  shell: /usr/local/bin/Rscript {0}
  env:
    RSPM: https://packagemanager.rstudio.com/cran/ __linux__ /bionic/latest
    GITHUB_PAT: ***
    R_LIBS_USER: /home/runner/work/_temp/Library
    TZ: UTC
    _R_CHECK_SYSTEM_CLOCK_: FALSE
    NOT_CRAN: true

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

$uploaded
[1] TRUE

$queued
[1] TRUE

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

$url
[1] "https://codecov.io/github/greta-dev/greta/commit/d6aac0eb36966bdb5ca8a8c71f822a80ca087f6b"

```

### Expected Results

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

### Actual Results

Coverage dropped to 1%

### Additional Information

Here is the codecov YAML

```yaml
comment: false

coverage:
  status:
    project:
      default:
        target: auto
        threshold: 1%
        informational: true
    patch:
      default:
        target: auto
        threshold: 1%
        informational: true

```

---

<div class="post-metadata">

### Author: ![tom](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/tom/32/8_2.png) [@tom](https://community.codecov.com/u/tom)
#### Post date: [July 31, 2021, 7:12am UTC](https://community.codecov.com/t/sudden-codecov-drop-when-using-github-actions/2849/2 "2021-07-31T07:12:53Z")

</div>

@njtierney sorry for the delay here. I took a look at the [coverage report](https://codecov.io/gh/greta-dev/greta/commit/38e5de2ab3e3d76b3f26c45986cf6f78e9b06471/build) 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.
