question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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:closed
  • Created 4 years ago
  • Comments:11

github_iconTop GitHub Comments

1reaction
Rjaecommented, Nov 8, 2019

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:

@Rjae https://github.com/Rjae any news?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/tonerdo/coverlet/issues/575?email_source=notifications&email_token=AC2GP2KF4JSGMSY4VVVNGMTQSVMPPA5CNFSM4I3O5VX2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEDRJMDQ#issuecomment-551720462, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC2GP2JQN7IB4KOPWYB5X6DQSVMPPANCNFSM4I3O5VXQ .

1reaction
MarcoRossignolicommented, Sep 28, 2019

Thanks I’ll take a look at logs asap

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found