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

No coverage reports found for @4, @5 using .NET's Microsoft.Testing.Platform #1735

Open
benjaminsampica opened this issue Dec 30, 2024 · 0 comments
Assignees
Labels
Medium Medium Priority Issues (to be fixed or re-evaluated in 3 months

Comments

@benjaminsampica
Copy link

benjaminsampica commented Dec 30, 2024

I'm trying to migrate some .NET test projects to the new Microsoft.Testing.Platform runner instead of the now-old Visual Studio based runner. However, I'm having issues getting the coverage file to be found by codecov after switching.

Here's my workflow file.

- name: Publish
      run: |
          dotnet restore
          dotnet run -c Release --project src/${{ env.project_name }}.Tests/${{ env.project_name }}.Tests.csproj --coverage --coverage-output-format xml --results-directory ./coverage
    - name: Upload coverage reports to Codecov
      uses: codecov/codecov-action@v5
      with:
        token: ${{ secrets.CODECOV_TOKEN }}
        directory: ./coverage # I've also tried 'coverage' as well as not including this property at all.
        verbose: true

Here's the job output:

Publish step

  In process file artifacts produced:
    - /home/runner/work/ars/ars/coverage/1dece2dd-61a2-4761-a929-71b9b28ff08a.xml
Test run summary: Passed! - /home/runner/work/ars/ars/src/Ars.Function.Tests/bin/Release/net9.0/Ars.Function.Tests.dll (net9.0|x64)

Upload coverage reports to Codecov step

Run codecov/codecov-action@v5
Run CC_ACTION_VERSION=$(cat ${GITHUB_ACTION_PATH}/src/version)
==> Running Action version 5.1.2
Run git config --global --add safe.directory /home/runner/work/ars/ars
Run CC_FORK="false"
Run if [ "false" == 'true' ] && [ "$CC_FORK" != 'true' ];
==> Token set from input
Run if [ -z "$CC_BRANCH" ] && [ -z "$CC_TOKEN" ] && [ "$CC_FORK" == 'true' ]
Run if [ -z "$CC_SHA" ];
Run ${GITHUB_ACTION_PATH}/dist/codecov.sh
     _____          _
    / ____|        | |
   | |     ___   __| | ___  ___ _____   __
   | |    / _ \ / _` |/ _ \/ __/ _ \ \ / /
   | |___| (_) | (_| |  __/ (_| (_) \ V /
    \_____\___/ \__,_|\___|\___\___/ \_/
                            Wrapper-0.0.31
                                  
==> Detected linux
 -> Downloading https://cli.codecov.io/latest/linux/codecov
==> Finishing downloading linux:latest
      Version: v9.1.1
 
gpg: directory '/home/runner/.gnupg' created
gpg: keybox '/home/runner/.gnupg/pubring.kbx' created
gpg: /home/runner/.gnupg/trustdb.gpg: trustdb created
gpg: key 806BB28AED779869: public key "Codecov Uploader (Codecov Uploader Verification Key) <[email protected]>" imported
gpg: Total number processed: 1
gpg:               imported: 1
==> Verifying GPG signature integrity
 -> Downloading https://cli.codecov.io/latest/linux/codecov.SHA256SUM
 -> Downloading https://cli.codecov.io/latest/linux/codecov.SHA256SUM.sig
 
gpg: Signature made Sat Dec  7 16:07:53 2024 UTC
gpg:                using RSA key 27034E7FDB850E0BBC2C62FF806BB28AED779869
gpg: Good signature from "Codecov Uploader (Codecov Uploader Verification Key) <[email protected]>" [unknown]
gpg: WARNING: This key is not certified with a trusted signature!
gpg:          There is no indication that the signature belongs to the owner.
Primary key fingerprint: 2703 4E7F DB85 0E0B BC2C  62FF 806B B28A ED77 9869
codecov: OK
==> CLI integrity verified
 -> Token of length 36 detected
==> Running upload-coverage
      ./codecov --verbose upload-coverage -t <redacted> --git-service github --dir coverage --gcov-executable gcov
info - 2024-12-[30](https://github.com/sendtrucks/ars/actions/runs/12540533840/job/34967933585#step:5:32) 01:38:12,971 -- ci service found: github-actions
debug - 2024-12-30 01:38:12,973 -- versioning system found: <class 'codecov_cli.helpers.versioning_systems.GitVersioningSystem'>
debug - 2024-12-30 01:38:12,974 -- versioning system found: <class 'codecov_cli.helpers.versioning_systems.GitVersioningSystem'>
debug - 2024-12-30 01:38:12,976 -- Loading config from /home/runner/work/ars/ars/.github/codecov.yml
debug - 2024-12-30 01:38:12,979 -- Starting upload coverage --- {"verbose": true, "auto_load_params_from": null, "codecov_yml_path": null, "enterprise_url": null, "version": "cli-9.1.1", "command": "upload-coverage", "git_service": "github", "files_search_root_folder": "coverage", "gcov_executable": "gcov", "commit_sha": "90ffe39a730bcc6204[31](https://github.com/sendtrucks/ars/actions/runs/12540533840/job/34967933585#step:5:33)0d20af0753c9ead27165", "fail_on_error": false, "slug": "sendtrucks/ars", "report_code": "default", "network_root_folder": "/home/runner/work/ars/ars", "files_search_exclude_folders": [], "files_search_explicitly_listed_files": [], "disable_search": false, "disable_file_fixes": false, "build_code": "1254053[38](https://github.com/sendtrucks/ars/actions/runs/12540533840/job/34967933585#step:5:41)40", "build_url": "https://github.com/sendtrucks/ars/actions/runs/12[54](https://github.com/sendtrucks/ars/actions/runs/12540533840/job/34967933585#step:5:58)0533840", "job_code": "Deploy Function App", "name": "12540533840", "branch": "main", "pull_request_number": null, "env_vars": {}, "flags": [], "plugin_names": ["xcode", "gcov", "pycoverage"], "dry_run": false, "use_legacy_uploader": false, "handle_no_reports_found": false, "report_type": "coverage",
debug - 2024-12-30 01:38:12,9[80](https://github.com/sendtrucks/ars/actions/runs/12540533840/job/34967933585#step:5:85) -- Selected preparation plugins --- {"selected_plugins": ["<class 'codecov_cli.plugins.xcode.XcodePlugin'>", "<class 'codecov_cli.plugins.gcov.GcovPlugin'>", "<class 'codecov_cli.plugins.pycoverage.Pycoverage'>"], "cli_config": {}}
debug - 2024-12-30 01:38:12,980 -- Running preparation plugin: <class 'codecov_cli.plugins.xcode.XcodePlugin'>
debug - 2024-12-30 01:38:12,980 -- Running xcode plugin...
warning - 2024-12-30 01:38:12,980 -- xcrun is not installed or can't be found.
debug - 2024-12-30 01:38:12,980 -- Running preparation plugin: <class 'codecov_cli.plugins.gcov.GcovPlugin'>
debug - 2024-12-30 01:38:12,980 -- Running gcov plugin...
warning - 2024-12-30 01:38:12,980 -- No gcov data found.
debug - 2024-12-30 01:38:12,981 -- Running preparation plugin: <class 'codecov_cli.plugins.pycoverage.Pycoverage'>
warning - 2024-12-30 01:38:12,981 -- coverage.py is not installed or can't be found.
debug - 2024-12-30 01:38:12,981 -- Collecting relevant files
info - 2024-12-30 01:38:12,988 -- Found 0 coverage files to report
Error: No coverage reports found. Please make sure you're generating reports successfully.
==> Failed to upload coverage

Any ideas what this could be?

@thomasrockhu-codecov thomasrockhu-codecov added support Medium Medium Priority Issues (to be fixed or re-evaluated in 3 months and removed support labels Jan 1, 2025
@thomasrockhu-codecov thomasrockhu-codecov self-assigned this Jan 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Medium Medium Priority Issues (to be fixed or re-evaluated in 3 months
Projects
None yet
Development

No branches or pull requests

2 participants