Skip to content

Commit

Permalink
ensure build fails when dotnet test returns non-zero exit code
Browse files Browse the repository at this point in the history
  • Loading branch information
hahn-kev committed Aug 7, 2024
1 parent 6dbb57c commit 7c70a3e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,14 @@ jobs:
- name: Build project
run: dotnet build --configuration Release

# there are cases where this will fail and we want to know about it
# so we don't use continue-on-error, but we still want to publish the results
- name: Test project
continue-on-error: true
run: dotnet test --filter "TestCategory != SkipOnTeamCity" --blame-hang-timeout 100s --logger:"trx;LogFilePrefix=results" --results-directory ./test-results
id: test
run: dotnet test --filter "TestCategory != SkipOnTeamCity" --blame-hang-timeout 5m --logger:"trx;LogFilePrefix=results" --results-directory ./test-results

- name: Publish test results
if: ${{ !cancelled() && steps.test.outcome != 'skipped' }}
uses: EnricoMi/publish-unit-test-result-action/windows@v2
with:
check_name: LibPalaso Tests
Expand Down

0 comments on commit 7c70a3e

Please sign in to comment.