Skip to content

Commit

Permalink
Merge pull request #1 from kylelaverty/feature/coverage-report
Browse files Browse the repository at this point in the history
Try again to add coveralls.io upload
  • Loading branch information
kylelaverty committed May 22, 2024
2 parents 6133baf + 5c50b53 commit 7f4a139
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:
push:
branches:
- main
- feature/**
paths-ignore:
- 'README.md'
- 'LICENSE'
Expand Down Expand Up @@ -65,10 +66,16 @@ jobs:
echo "## ❔ Test results" >> $GITHUB_STEP_SUMMARY
dotnet test --configuration ${{ env.BUILD_CONFIGURATION }} --no-build --verbosity normal --logger GitHubActions '/p:CollectCoverage=true;CoverletOutputFormat="json,lcov,cobertura";MergeWith=${{github.workspace}}/coverage.json;CoverletOutput=${{github.workspace}}/coverage' test/learning-fast-endpoints-tests -- RunConfiguration.CollectSourceInformation=true
- name: Code Coverage Report 📝
- name: 📝 Code Coverage Report
run: |
dotnet tool install --global dotnet-reportgenerator-globaltool --version 5.1.23
reportgenerator -reports:${{github.workspace}}/coverage.cobertura.xml -targetdir:${{github.workspace}}/report -reporttypes:MarkdownSummaryGithub "-filefilters:-*.g.cs;-*.gen.cs" -verbosity:Warning
sed -i 's/# Summary/## 📝 Code Coverage/g' ${{github.workspace}}/report/SummaryGithub.md
sed -i 's/## Coverage/### Code Coverage details/g' ${{github.workspace}}/report/SummaryGithub.md
cat ${{github.workspace}}/report/*.md >> $GITHUB_STEP_SUMMARY
- name: 📝 Publish coverage report to coveralls.io
uses: coverallsapp/github-action@v2.3.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
file: ${{github.workspace}}/coverage.cobertura.xml

0 comments on commit 7f4a139

Please sign in to comment.