Skip to content

Commit

Permalink
Separate cov from CI
Browse files Browse the repository at this point in the history
  • Loading branch information
lekman committed Aug 10, 2023
1 parent 366e8dd commit b970a6a
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/build_verification_dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ jobs:
- name: Run unit tests
if: ${{ inputs.run_tests == true }}
run: |
dotnet test ${{ env.TEST_PROJECT_PATH }} --configuration Debug --logger "trx;LogFileName=test-results.trx"
dotnet test ${{ env.TEST_PROJECT_PATH }} --configuration Release --no-build --verbosity normal --collect:"XPlat Code Coverage" --results-directory ./coverage
# A custom label can be generated to differentiate between multiple tests in the same action run
Expand Down Expand Up @@ -118,13 +117,20 @@ jobs:
max-annotations: "50"
fail-on-error: "true"

# Execute the unit tests
- name: Run coverage tests
if: ${{ inputs.report_coverage == true }}
run: |
dotnet test ${{ env.TEST_PROJECT_PATH }} --configuration Release --no-build --verbosity normal --collect:"XPlat Code Coverage" --results-directory ./coverage
# Report coverage summary to the user
- name: Code Coverage Report
uses: irongut/CodeCoverageSummary@v1.3.0
if: ${{ inputs.report_coverage == true }}
with:
filename: coverage/**/coverage.cobertura.xml
badge: true
fail_below_min: true
fail_below_min: false
format: markdown
hide_branch_rate: false
hide_complexity: true
Expand Down

0 comments on commit b970a6a

Please sign in to comment.