Error processing coverage reports from public GitLab repo using GitLab CI

Description

When running the Python codecov uploader on the GitLab CI, something is successfully sent to codecov.io but the dashboard indicates there was an error processing the coverage report. The output from running the codecov uploader indicates that somehow only the coveragerc file is being uploaded, despite the fact that the coverage report is generated successfully.

Repository

CI/CD

GitLab CI

An example of the CI running the codecove command and successfully sending to codecov.io: py37-coverage (#601988019) · Jobs · LMSAL_HUB / AIA HUB / aiapy · GitLab

Uploader

Python uploader, v2.1.7 with coverage v5.1, Python 3.7

Commit SHAs

eaf7a31489a968b8e83f53e010afa0b1a65e012e

Codecov YAML

I have not included a codecov.yml file in my repo

Codecov Output

$ codecov --token=$CODECOV_TOKEN
      _____          _
     / ____|        | |
    | |     ___   __| | ___  ___ _____   __
    | |    / _ \ / _  |/ _ \/ __/ _ \ \ / /
    | |___| (_) | (_| |  __/ (_| (_) \ V /
     \_____\___/ \____|\___|\___\___/ \_/
                                    v2.1.7
==> Detecting CI provider
    Gitlab CI Detected
==> Preparing upload
==> Processing gcov (disable by -X gcov)
==> Collecting reports
    + /builds/LMSAL_HUB/aia_hub/aiapy/aiapy/tests/coveragerc bytes=767
==> Uploading
    .url https://codecov.io
    .query commit=eaf7a31489a968b8e83f53e010afa0b1a65e012e&branch=master&token=<secret>&service=gitlab&build=601988019&slug=LMSAL_HUB%2Faia_hub%2Faiapy&package=py2.1.7
    Gzipping contents..
    Compressed contents to 972 bytes
    Pinging Codecov...
    Uploading to S3...
    https://codecov.io/gitlab/LMSAL_HUB:aia_hub/aiapy/commit/eaf7a31489a968b8e83f53e010afa0b1a65e012e

Steps to Reproduce

This CI job shows each step to reproduce the issue. However, I’ve found that I cannot reproduce this locally.

Expected behavior: A valid coverage report is uploaded to codecov.io each time the CI is run.

Actual behavior: Something is uploaded to codecov.io, but the coverage report cannot be processed

Flakiness? This happens every time when running codecov on the GitLab CI

Hi @wtbarnes, looks like we aren’t able to find the coverage report being generated. You can use these arguments to specify the file or directory. Are you able to echo where the coverage report is being stored on the CI/CD?

Hi @tom. Yes, the issue was that my coverage reports were not being generated even when I thought they were. Sorry for the confusion and thanks for your help!

1 Like