5

I have been stuck with this for the last couple of days.

I created a private github repository with CMake, C++. I then added actions to build and test the code. Since the repo is private, I added a secret token as suggested by the codeconv docs.

After the tests are completed, I wish to also check for code coverage with the codeconv, so I added another another step at the bottom of my YAML:

- name: Test
  working-directory: ${{ steps.strings.outputs.build-output-dir }}
  run: ctest --verbose -C ${{ matrix.build_type }} --reporter xml

- name: Upload coverage reports to Codecov
  uses: codecov/[email protected]
  with:
    token: ${{ secrets.CODECOV_TOKEN }}
    slug: <user>/<repo>

as was suggested by the codecov docs.

In case that matters, my executables are not in the same directory as build. The tests pass, but the codeconv exits with an error:

info - 2024-03-20 09:56:26,137 -- ci service found: github-actions
warning - 2024-03-20 09:56:26,141 -- No config file could be found. Ignoring config.
warning - 2024-03-20 09:56:26,147 -- xcrun is not installed or can't be found.
warning - 2024-03-20 09:56:26,163 -- No gcov data found.
warning - 2024-03-20 09:56:26,164 -- coverage.py is not installed or can't be found.
info - 2024-03-20 09:56:26,196 -- Found 0 coverage files to upload
Error: No coverage reports found. Please make sure you're generating reports successfully.
Warning: Codecov: 
                      Failed to properly upload report: The process '/home/runner/work/_actions/codecov/codecov-action/v4.0.1/dist/codecov' failed with exit code 1

complaining that the report was not found. Does anybody have an idea what to do?

1
  • 1
    I have same problem too Commented May 3, 2024 at 8:44

1 Answer 1

1

I ran into this issue myself.

I found out that the codecov action is just an upload script. The reports (for coverage etc.) must be generated with the help of other tools.

So for my Java project I added jacoco execution which generates a coverage report. Codecov action is then able to detect this report and upload it to codecov.io.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.