Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V2 not picking up C++/catch2 outputs #666

Closed
stenczelt opened this issue Mar 5, 2022 · 2 comments
Closed

V2 not picking up C++/catch2 outputs #666

stenczelt opened this issue Mar 5, 2022 · 2 comments

Comments

@stenczelt
Copy link

Tried updating to V2 in my actions for a C++ project which uses catch2 for tests. This change broke the coverage upload, because no files were found:

==> linux OS detected
https://uploader.codecov.io/latest/linux/codecov.SHA256SUM
==> SHASUM file signed by key id 806bb28aed779869
==> Uploader SHASUM verified (ca88335829e3a5b589674a200fdd1dae8f2ef27775647bc3aef6677266a6fda2  codecov)
==> Running version latest
==> Running version v0.1.17
[command]/home/runner/work/_actions/codecov/codecov-action/v2/dist/codecov -n catch2-tests -Q github-action-2.1.0 -Z
[2022-03-05T08:10:08.046Z] ['info'] 
     _____          _
    / ____|        | |
   | |     ___   __| | ___  ___ _____   __
   | |    / _ \ / _` |/ _ \/ __/ _ \ \ / /
   | |___| (_) | (_| |  __/ (_| (_) \ V /
    \_____\___/ \__,_|\___|\___\___/ \_/

  Codecov report uploader 0.1.17
[2022-03-05T08:10:08.052Z] ['info'] => Project root located at: /home/runner/work/***/***
[2022-03-05T08:10:08.054Z] ['info'] ->  Token found by environment variables
[2022-03-05T08:10:08.060Z] ['info'] Searching for coverage files...
[2022-03-05T08:10:08.095Z] ['info'] Warning: Some files located via search were excluded from upload.
[2022-03-05T08:10:08.095Z] ['info'] If Codecov did not locate your files, please review https://docs.codecov.com/docs/supported-report-formats
[2022-03-05T08:10:08.095Z] ['error'] There was an error running the uploader: No coverage files located, please try use `-f`, or change the project root with `-R`
##[error]Codecov: Failed to properly upload: The process '/home/runner/work/_actions/codecov/codecov-action/v2/dist/codecov' failed with exit code 255
Post job cleanup.
[command]/usr/bin/git version
git version 2.35.1
[command]/usr/bin/git config --local --name-only --get-regexp core\.sshCommand
[command]/usr/bin/git submodule foreach --recursive git config --local --name-only --get-regexp 'core\.sshCommand' && git config --local --unset-all 'core.sshCommand' || :
[command]/usr/bin/git config --local --name-only --get-regexp http\.https\:\/\/github\.com\/\.extraheader
http.https://github.com/.extraheader
[command]/usr/bin/git config --local --unset-all http.https://github.com/.extraheader
[command]/usr/bin/git submodule foreach --recursive git config --local --name-only --get-regexp 'http\.https\:\/\/github\.com\/\.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :
Cleaning up orphan processes

I suspext this is due to the breaking change of. not digesting any format. How to adapt the CI so that I get the correct xml/other files for your upload to work? Ie. what would be a needed change in the running of tests or an extra CI step that does the conversion that was implicit in V1?

My CI looks as follows:

- name: Configure CMake
        run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}

      - name: Build
        run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}

      - name: Install
        run: cmake --install ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}

      - name: Test - Catch2
        run: ./build/bin/unit_tests

      - name: Test - Python
        working-directory: ${{github.workspace}}
        run: pytest --cov python

      - name: coverage report with branches
        run: gcovr -r . -f include -f src -b

      - name: CodeCov upload
        uses: codecov/codecov-action@v1
        with:
          token: ${{ secrets.CODECOV_TOKEN }}
          name: catch2-tests
          fail_ci_if_error: true

Which breaks if I change to codecov/codecov-action@v1.
The python tests should just get --cov-report=xml I guess, but what do I do for the catch2 tests?

@stenczelt
Copy link
Author

may relate to #577 and #654

@thomasrockhu-codecov
Copy link
Contributor

@stenczelt please open a topic in our community boards if this is still an issue. I think you may need to run coverage xml after you run python coverage, but this was also built into v3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants