Extended build-and-test pipeline for net10 support (#175) #249
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: build-and-test | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| branches: | |
| - master | |
| jobs: | |
| build-and-test: | |
| runs-on: ubuntu-latest | |
| env: | |
| config: 'Release' | |
| DOTNET_NOLOGO: true | |
| DOTNET_CLI_TELEMETRY_OPTOUT: true | |
| defaults: | |
| run: | |
| working-directory: src | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| - name: Setup .NET 10 | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: 10.0.x | |
| - name: Clean | |
| run: dotnet clean ./FuncSharp.sln --configuration $config && dotnet nuget locals all --clear | |
| - name: Install dependencies | |
| run: dotnet restore | |
| - name: Build | |
| run: dotnet build --configuration $config --no-restore | |
| - name: Test | |
| run: dotnet test --no-restore --no-build --configuration $config --logger "trx;LogFileName=test-results.trx" || true | |
| - name: Test Report | |
| uses: dorny/test-reporter@v1 | |
| if: success() || failure() | |
| with: | |
| name: Mews.FuncSharp Tests report | |
| path: "**/test-results.trx" | |
| reporter: dotnet-trx | |
| fail-on-error: true |