codecov-action icon indicating copy to clipboard operation
codecov-action copied to clipboard

Impossible to display my files in the codecov interface anymore

Open 12rambau opened this issue 4 months ago • 0 comments

I recently updated my version of the codecov action version and it seems I have broken something. The codecov report is still send to codecov with the exact same values as the one provided in the xml file but now whenever I want to explore the files content and see the coverage miss I get the same error:

There was a problem getting the source code from your provider. Unable to show line by line coverage.

My action parameter are as follow:

A first step creates the report and save it in an artificat (only one of my matrix run is creating one.

- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
  uses: actions/setup-python@v5
  with:
    python-version: ${{ matrix.python-version }}
- name: Install nox
  run: pip install nox
- name: test with pytest
  run: nox -s ci-test
- name: assess dead fixtures
  if: ${{ matrix.python-version == '3.10' }}
  shell: bash
  run: nox -s dead-fixtures
- uses: actions/upload-artifact@v4
  if: ${{ matrix.python-version == '3.10' }}
  with:
    name: coverage
    path: coverage.xml

And a second one reads it from the artifact:

- uses: actions/download-artifact@v4
  with:
    name: coverage
- name: codecov
  uses: codecov/codecov-action@v4
  with:
    file: ./coverage.xml
    token: ${{ secrets.CODECOV_TOKEN }}
    verbose: true
    fail_ci_if_error: true

Am I doing anything wrong ? I read in some places that it could be related to path resolution but I don"t really get what i could change as the coverage.xml file is litteraly loaded in the root of the checkouted files.

In case you wxant to see the fuill CI it's available on github here: https://github.com/gee-community/geetools/blob/codecov/.github/workflows/unit.yaml

12rambau avatar Oct 01 '24 19:10 12rambau