Skip to content

Commit

Permalink
Add binary logging and upload those logs on failure
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonleenaylor committed Aug 28, 2024
1 parent e4a1935 commit 5be74c4
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ jobs:
fetch-depth: '0'

- name: Build project
run: dotnet build --configuration Release
run: dotnet build -bl:build.binlog --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
id: test
run: dotnet test --filter "TestCategory != SkipOnTeamCity" --blame-hang-timeout 5m --logger:"trx;LogFilePrefix=results" --results-directory ./test-results
run: dotnet test -bl:test.binlog --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' }}
Expand All @@ -34,4 +34,13 @@ jobs:
check_name: LibPalaso Tests
files: ./test-results/**/*.trx
action_fail: true
action_fail_on_inconclusive: true
action_fail_on_inconclusive: true

- name: Publish logs on failure
if: failure()
uses: actions/upload-artifact@v3
with:
name: binary-logs
path: |
build.binlog
test.binlog

0 comments on commit 5be74c4

Please sign in to comment.