0% Coverage Reported in GitHub Workflow
See original GitHub issue@MarcoRossignoli I just finished configuring a GH Actions workflow. All is well except my 100% coverage solution is reported as 0% running under GH Actions. The same project running on Travis (xenial) and local (Windows) is reported as 100%.
I’ve tried 2.2.108, 204, 401, 402 - along with 2.6.3. I tried all the workarounds listed on this thread, no luck. If you’re aware of any other fixes I may try please let me know.
name: CI
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Runtime
uses: actions/setup-dotnet@v1
with:
dotnet-version: 2.2.204
- name: Tools
run: dotnet tool install --global dotnet-reportgenerator-globaltool
- name: Build
run: dotnet build
- name: Test
run: dotnet test /p:CollectCoverage=true /p:CoverletOutputFormat=OpenCover /p:Exclude=\"[xunit.*]*,[*]*.Migrations.*\"
- name: Report
run: |
export DOTNET_ROOT=/opt/hostedtoolcache/dncs/2.2.204/x64
export MSBuildSDKsPath=$DOTNET_ROOT/sdk/$(${DOTNET_ROOT}/dotnet --version)/Sdks
export PATH="$PATH:$HOME/.dotnet/tools"
~/.dotnet/tools/reportgenerator "-reports:*Tests/coverage.opencover.xml" "-targetdir:coverage-reports"
- name: Artifacts
uses: actions/upload-artifact@master
with:
name: Coverage
path: coverage-reports
Issue Analytics
- State:
- Created 4 years ago
- Comments:11
Top Results From Across the Web
My builds always incorrectly report coverage to be 0% #74
I'm running my tests using Github Actions, and posting the report using the github action in this repo. I'm generating my reports using...
Read more >Coverage is 0% Even after successful execution of gitaction
Taking a look at this pull request analysis it appears that coverage data is being imported, there's simply no coverage being reported for...
Read more >0% Coverage on Github Action Python CI - SonarCloud
Hi team,. Sonar has been working great in our project for a few months already, but it was time that we tried to...
Read more >SonarCloud code coverage remains 0.0 in GitHub Actions ...
The warning still appears and code coverage is still 0.0%. Any hints to get this going? [edit]:. My workflow in GitHub Actions looks...
Read more >GitHub Actions: Publish Code Coverage Summary to Pull ...
Using GitHub Actions to add a code coverage summary report comment to a pull request and job summary.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
My goal is to return to this at the end of next week. It hasn’t left my hit list of things to get to. Thanks Marco!
On Fri, Nov 8, 2019 at 7:37 AM Marco Rossignoli notifications@github.com wrote:
Thanks I’ll take a look at logs asap