Make the tests run but not failt the build #325
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Tests on Windows | |
| on: [push, pull_request] | |
| jobs: | |
| build: | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Setup .NET 10 SDK | |
| uses: actions/setup-dotnet@v1.7.2 | |
| with: | |
| dotnet-version: 10.0.x | |
| - name: Clean | |
| run: dotnet clean | |
| - name: Install dependencies | |
| run: dotnet restore | |
| - name: Build | |
| run: dotnet build --configuration Debug --no-restore | |
| - name: Test | |
| id: test | |
| continue-on-error: true | |
| run: dotnet test --no-build --no-restore --verbosity normal --filter Category=CI --logger "trx;LogFileName=test-results.trx" | |
| - name: Publish Test Results | |
| uses: EnricoMi/publish-unit-test-result-action/windows@v2 | |
| if: always() | |
| with: | |
| files: '**/test-results.trx' | |
| check_name: 'Test Results' | |
| - name: Check Test Results | |
| if: steps.test.outcome == 'failure' | |
| run: | | |
| echo "::warning::Tests failed" | |
| exit 1 |