Initial Commit #6
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: CI | |
| on: | |
| push: | |
| branches: [ master ] | |
| pull_request: | |
| branches: [ master ] | |
| permissions: | |
| contents: read | |
| checks: write | |
| pull-requests: write | |
| jobs: | |
| build-and-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # NBGV needs full history to compute git height | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: '10.0.x' | |
| - name: Restore | |
| run: dotnet restore | |
| - name: Build | |
| run: dotnet build --no-restore --configuration Release | |
| - name: Test | |
| run: > | |
| dotnet test --no-build --configuration Release | |
| --logger trx | |
| --results-directory ./test-results | |
| - name: Upload test results | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: test-results | |
| path: ./test-results/ | |
| # Rich check-run report with per-test detail (runs on both push and PR) | |
| - name: Publish test report | |
| uses: dorny/test-reporter@v1 | |
| if: always() | |
| with: | |
| name: Test results | |
| path: ./test-results/*.trx | |
| reporter: dotnet-trx | |
| # PR comment summary (only meaningful on pull requests) | |
| - name: Publish PR test summary | |
| uses: EnricoMi/publish-unit-test-result-action@v2 | |
| if: always() && github.event_name == 'pull_request' | |
| with: | |
| files: ./test-results/**/*.trx |