Skip to content

Commit

Permalink
Collect trx output and process
Browse files Browse the repository at this point in the history
  • Loading branch information
cb-martinsmith committed Aug 21, 2024
1 parent a428399 commit 7d5a5c2
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ jobs:
run: dotnet build --no-restore --configuration ${{ env.BUILD_CONFIG }} /p:"Platform=${{ env.BUILD_PLATFORM }}" /p:"Version=${{ needs.setup.outputs.product_version }}" /p:"AssemblyVersion=${{ needs.setup.outputs.assembly_version }}"

- name: Test
run: dotnet test --no-restore --no-build --configuration ${{ env.BUILD_CONFIG }} --verbosity normal --collect:"XPlat Code Coverage"
run: dotnet test --no-restore --no-build --configuration ${{ env.BUILD_CONFIG }} --verbosity normal --logger:trx;LogFileName=TestOutput.trx --collect:"XPlat Code Coverage"

- name: Code Coverage Report
uses: irongut/[email protected]
Expand All @@ -137,10 +137,18 @@ jobs:
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
comment-title: 'Unit Test Results'
results-path: ./TestResults/*.trx
results-path: "**/*.trx"
coverage-path: "**/coverage.cobertura.xml"
coverage-threshold: ${{ env.COVERAGE_WARNING_THRESHOLD }}

- uses: actions/upload-artifact@v4 # upload test results
if: success() || failure() # run this step even if previous step failed
with:
name: test-results
badge-title: Test Results
path: "**/*.trx"
reporter: dotnet-trx

- name: Pull Request - Add Coverage Comment
uses: marocchino/sticky-pull-request-comment@v2
if: github.event_name == 'pull_request'
Expand Down

0 comments on commit 7d5a5c2

Please sign in to comment.