GitHub not getting CodeCov report after switching from Travis to GitHub Actions for CI

I assume this is some configuration step that I’m missing, but I’ve been using CodeCov for years with Travis, and it’s worked great. But recently I switched to using GitHub actions for my CI. It seems to be working, and it uploads the coverage to CodeCov, who apparently sees the commit, since it’s listed in the recent commits section. But there are two problems:

  1. GitHub is not getting the report back. E.g. https://github.com/rmjarvis/Piff/actions/runs/369566899 shows successful runs of the tests, and apparently successful codecov upload steps. But it’s not receiving back the coverage as another integration the way it used to with Travis.

  2. On the CodeCov website, I can see the commit listed, but if I try to click on the “Browse Report” button next to the commit message (Codecov), I get a 500 Server Error page.

It seems plausible that these two facts are related. This is happening on two repos that I’ve recently switched to GitHub actions. (Here is the other one: Codecov) So I’m assuming this is just some aspect of the configuration that I need to adjust related to the switch from Travis, but I haven’t been able to figure out what I might be doing wrong.

Thanks very much for any assistance you can provide.

Mike Jarvis
(Codecov and GitHub username rmjarvis)

@rmjarvis, apologies here, I’ll be pushing a fix this week, and thank you for your patience.

Hi @rmjarvis, I made a quickfix here, would you be able to see if you are still experiencing issues for new commits?

Thanks. It’s not giving me a 500 server error, but it’s still not showing the report, nor apparently reporting back to GitHub.

Here is the report page of my recent empty commit:

It says " There was an error processing coverage reports. Most common issues: …"

And here is the corresponding page on GitHub with the actions that pushed the commit to codecov:
https://github.com/rmjarvis/Piff/actions/runs/381974488

This is pretty strange @rmjarvis, can you try running cd .. before the codecov step? It looks like we are getting the wrong network here. If that doesn’t work, shoot me over the commit SHA.

Sorry, I don’t seem to be getting notifications of your messages. Just saw this today. I’ll try to remember to check back here more regularly. Anyway, I tried cd .. before codecov, and now it says no coverage report found, so I don’t think that’s right:

  pwd
  pwd -P
  cd tests
  ls -lsrta
  cd ..
  codecov
  shell: /bin/bash -e {0}
  env:
    pythonLocation: /opt/hostedtoolcache/Python/3.7.9/x64
    LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.7.9/x64/lib
/home/runner/work/Piff/Piff
/home/runner/work/Piff/Piff
total 640
  4 -rw-r--r--  1 runner docker    883 Dec  1 21:42 custom_wcs.py
  4 drwxr-xr-x  2 runner docker   4096 Dec  1 21:42 .matplotlib
  4 -rw-r--r--  1 runner docker     13 Dec  1 21:42 .gitignore
  4 -rw-r--r--  1 runner docker    573 Dec  1 21:42 .coveragerc
 16 -rw-r--r--  1 runner docker  13866 Dec  1 21:42 test_poly.py
 56 -rw-r--r--  1 runner docker  54851 Dec  1 21:42 test_pixel.py
  4 -rw-r--r--  1 runner docker   2093 Dec  1 21:42 test_output.py
  8 -rw-r--r--  1 runner docker   6441 Dec  1 21:42 test_outliers.py
 12 -rw-r--r--  1 runner docker   9335 Dec  1 21:42 test_optics.py
 16 -rw-r--r--  1 runner docker  12473 Dec  1 21:42 test_meanify.py
 12 -rw-r--r--  1 runner docker  10314 Dec  1 21:42 test_knn_interp.py
 44 -rw-r--r--  1 runner docker  45043 Dec  1 21:42 test_input.py
 40 -rw-r--r--  1 runner docker  37138 Dec  1 21:42 test_gsobject_model.py
 20 -rw-r--r--  1 runner docker  17624 Dec  1 21:42 test_gp_interp.py
  4 -rw-r--r--  1 runner docker   3839 Dec  1 21:42 piff_test_helper.py
  4 -rw-r--r--  1 runner docker    629 Dec  1 21:42 y1_test.readme
  4 -rwxr-xr-x  1 runner docker    124 Dec  1 21:42 time_all_tests
 32 -rw-r--r--  1 runner docker  31322 Dec  1 21:42 test_wcs.py
 32 -rw-r--r--  1 runner docker  30410 Dec  1 21:42 test_stats.py
 24 -rw-r--r--  1 runner docker  22416 Dec  1 21:42 test_star.py
 36 -rw-r--r--  1 runner docker  36475 Dec  1 21:42 test_simple.py
  4 drwxr-xr-x 12 runner docker   4096 Dec  1 21:50 ..
  4 drwxr-xr-x  2 runner docker   4096 Dec  1 21:51 input
  4 -rw-r--r--  1 runner docker    723 Dec  1 21:52 pixel_des.yaml
  4 -rw-r--r--  1 runner docker    349 Dec  1 21:52 pixel_moffat.yaml
  4 -rw-r--r--  1 runner docker    345 Dec  1 21:52 simple.yaml
  4 -rw-r--r--  1 runner docker    431 Dec  1 21:52 rho.yaml
  4 drwxr-xr-x  2 runner docker   4096 Dec  1 21:53 __pycache__
  4 drwxr-xr-x  3 runner docker   4096 Dec  1 21:53 output
224 -rw-r--r--  1 runner docker 229376 Dec  1 21:53 .coverage.fv-az21-990.7388.212431
  4 drwxr-xr-x  6 runner docker   4096 Dec  1 21:53 .

      _____          _
     / ____|        | |
    | |     ___   __| | ___  ___ _____   __
    | |    / _ \ / _  |/ _ \/ __/ _ \ \ / /
    | |___| (_) | (_| |  __/ (_| (_) \ V /
     \_____\___/ \____|\___|\___\___/ \_/
                                    v2.1.10

==> Detecting CI provider
    GitHub Actions CI Detected
==> Preparing upload
==> Processing gcov (disable by -X gcov)
==> Collecting reports
Error: No coverage report found
Tip: See all example repositories: https://github.com/codecov?query=example

The commit SHA is 2e2b9503ac6919e8e1b661babacc030776186f8c

But the previous one (39b0666ca9657b73028584caf395ff1760920b78) is probably better to look at in more detail, since that’s the one that I think more closely matched what was working on Travis. And the text in the action to upload to codecov looks more reasonable:

https://github.com/rmjarvis/Piff/runs/1450260908?check_suite_focus=true

@rmjarvis, can you try using the bash uploader?

can you try using the bash uploader?

Perfect! That worked. I guess that means maybe there is an error in the codecov executable not doing the same thing as the bash uploader? Anyway, this is a fine solution for me. I’ll just stick with this line instead:

bash <(curl -s https://codecov.io/bash)

Thanks so much for your help and patience with this!

So glad to hear that it worked! We maintain the bash uploader much more so than any other uploader, so I’m guessing that a change hasn’t propagated downstream. Thank you for your patience!

Unfortunately, I have run into the same issue on a project I work on and using the bash uploader does not seem to solve it.
A recently executed action that seems to suggest the upload should have worked: https://github.com/spirit-code/spirit/runs/1673323097?check_suite_focus=true#step:8:4649

The only difference I am currently able to find is that @rmjarvis uses a codecov.yml file and that I generate a coverage.info file (using lcov) and call bash <(curl -s https://codecov.io/bash) -f coverage.info, but both should not make a difference I believe (especially since it used to work with Travis CI).

I would be grateful for any suggestions!

Interestingly, the codecov action works, I simply added

- name: upload C++ coverage
  uses: codecov/codecov-action@v1
  with:
    files: ${{runner.workspace}}/build/coverage.info

Hmmm @GPMueller, from the previous run of the bash uploader, I’m only seeing that the commit was removed (probably a rebase?). The action is just a wrapper on top of the bash uploader, so I’m guessing this must have been a temporary blip.