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

Bug: Codecov is unable to find unit tests coverage report file #1336

Closed
hocinehacherouf opened this issue Oct 13, 2022 · 0 comments · Fixed by #1337
Closed

Bug: Codecov is unable to find unit tests coverage report file #1336

hocinehacherouf opened this issue Oct 13, 2022 · 0 comments · Fixed by #1337
Assignees
Labels
bug Something isn't working
Milestone

Comments

@hocinehacherouf
Copy link
Contributor

hocinehacherouf commented Oct 13, 2022

coverage.cobertura.xml file is not generated by unit tests:

Starting test execution, please wait...
A total of 1 test files matched the specified pattern.
Data collector 'XPlat code coverage' message: [coverlet]System.TypeLoadException: Could not load type 'Microsoft.Extensions.DependencyInjection.ServiceCollection' from assembly 'Microsoft.Extensions.DependencyInjection, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'.
   at Coverlet.Collector.DataCollection.CoverletCoverageCollector.GetDefaultServiceCollection(TestPlatformEqtTrace eqtTrace, TestPlatformLogger logger, String testModule)
   at Coverlet.Collector.DataCollection.CoverletCoverageCollector.OnSessionStart(Object sender, SessionStartEventArgs sessionStartEventArgs) in /_/src/coverlet.collector/DataCollection/CoverletCoverageCollector.cs:line 132.
Results File: /home/runner/work/IoT-Hub-Portal/IoT-Hub-Portal/src/AzureIoTHub.Portal.Tests.Unit/TestResults/_fv-az186-168_2022-10-[12](https://github.com/CGI-FR/IoT-Hub-Portal/actions/runs/3235549877/jobs/5300135754#step:9:13)_[14](https://github.com/CGI-FR/IoT-Hub-Portal/actions/runs/3235549877/jobs/5300135754#step:9:15)_38_17.trx
_____          _
    / ____|        | |
   | |     ___   __| | ___  ___ _____   __
   | |    / _ \ / _` |/ _ \/ __/ _ \ \ / /
   | |___| (_) | (_| |  __/ (_| (_) \ V /
    \_____\___/ \__,_|\___|\___\___/ \_/

  Codecov report uploader 0.3.2
[2022-10-13T06:21:38.429Z] ['info'] => Project root located at: /home/runner/work/IoT-Hub-Portal/IoT-Hub-Portal
[2022-10-13T06:21:38.432Z] ['info'] ->  Token found by environment variables
[2022-10-13T06:21:38.434Z] ['verbose'] Start of network processing...
[2022-10-13T06:21:38.434Z] ['verbose'] Searching for files in /home/runner/work/IoT-Hub-Portal/IoT-Hub-Portal
[2022-10-13T06:21:38.443Z] ['verbose'] coveragepy is not installed
[2022-10-13T06:21:38.443Z] ['info'] Searching for coverage files...
[2022-10-13T06:21:38.[50](https://github.com/CGI-FR/IoT-Hub-Portal/actions/runs/3240097003/jobs/5310301335#step:11:51)0Z] ['info'] Warning: Some files located via search were excluded from upload.
[2022-10-13T06:21:38.500Z] ['info'] If Codecov did not locate your files, please review https://docs.codecov.com/docs/supported-report-formats
[2022-10-13T06:21:38.500Z] ['error'] There was an error running the uploader: No coverage files located, please try use `-f`, or change the project root with `-R`
[2022-10-13T06:21:38.501Z] ['verbose'] The error stack is: Error: No coverage files located, please try use `-f`, or change the project root with `-R`
    at main (/snapshot/repo/dist/src/index.js)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
[2022-10-13T06:21:38.501Z] ['verbose'] End of uploader: 81 milliseconds

Related to coverlet-coverage/coverlet#1390

@hocinehacherouf hocinehacherouf added the bug Something isn't working label Oct 13, 2022
@hocinehacherouf hocinehacherouf added this to the S42 milestone Oct 13, 2022
@hocinehacherouf hocinehacherouf self-assigned this Oct 13, 2022
@hocinehacherouf hocinehacherouf moved this to 🚧 In Progress in IoT Hub Portal Oct 13, 2022
@hocinehacherouf hocinehacherouf changed the title Bug: CodeCov is unable to find unit tests coverage report file Bug: Codecov is unable to find unit tests coverage report file Oct 13, 2022
@hocinehacherouf hocinehacherouf moved this from 🚧 In Progress to 🚀 Ready in IoT Hub Portal Oct 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: 🚀 Ready
Development

Successfully merging a pull request may close this issue.

1 participant