Skip to content

Commit

Permalink
Publish Test Results to PR (#278)
Browse files Browse the repository at this point in the history
* Publish Test Results to PR
* don't use output, just find the trx files
* --results-directory
* trx

---------

Co-authored-by: Carl Meyertons <[email protected]>
Co-authored-by: Jody Donetti <[email protected]>
  • Loading branch information
cmeyertons and jodydonetti authored Aug 18, 2024
1 parent 1c1c726 commit 74e357c
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
workflow_dispatch:
env:
DOTNET_NOLOGO: true
TEST_RESULTS: artifacts/tests
jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -13,6 +14,19 @@ jobs:
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'

- run: dotnet --info
- name: Build solution and run all tests
run: dotnet test --verbosity normal
run: dotnet test --verbosity normal -l trx --results-directory '${{ env.TEST_RESULTS }}'

- name: Publish test results
uses: EnricoMi/publish-unit-test-result-action/linux@v2
if: ${{ success() || failure() }}
with:
files: '${{ env.TEST_RESULTS }}/*.trx'
check_name: "Test results"
report_individual_runs: true
action_fail: true
time_unit: milliseconds
#ignore_runs: true
compare_to_earlier_commit: false

0 comments on commit 74e357c

Please sign in to comment.