chore: remove .squad files from main (#116) #64
Workflow file for this run
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: Unit Tests | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| - v-next | |
| permissions: | |
| contents: read | |
| checks: write | |
| pull-requests: write | |
| env: | |
| DEFAULT_DOTNET_VERSION: "10.0.x" | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| name: Run Unit Tests | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: | | |
| ${{ env.DEFAULT_DOTNET_VERSION }} | |
| 10.0.x | |
| - name: Restore dependencies | |
| run: dotnet restore | |
| - name: Build solution | |
| run: dotnet build --no-restore --configuration Release | |
| - name: Run unit tests | |
| run: dotnet test --no-build --configuration Release --verbosity normal --collect:"XPlat Code Coverage" --results-directory ./TestResults --logger trx --logger "console;verbosity=detailed" | |
| - name: Publish Test Results | |
| uses: dorny/test-reporter@v1 | |
| if: always() | |
| with: | |
| name: .NET Tests | |
| path: ./TestResults/**/*.trx | |
| reporter: dotnet-trx | |
| fail-on-error: true | |
| - name: Install ReportGenerator | |
| run: dotnet tool install -g dotnet-reportgenerator-globaltool | |
| - name: ReportGenerator - Merge & Deduplicate Coverage | |
| run: | | |
| reportgenerator -reports:"./TestResults/**/*.cobertura.xml" -targetdir:./CodeCoverage -reporttypes:Cobertura -title:"Coverage Summary" | |
| - name: Code Coverage Report | |
| uses: irongut/CodeCoverageSummary@v1.3.0 | |
| if: always() | |
| with: | |
| filename: ./CodeCoverage/Cobertura.xml | |
| badge: true | |
| fail_below_min: false | |
| format: markdown | |
| hide_branch_rate: false | |
| hide_complexity: true | |
| indicators: true | |
| output: both | |
| thresholds: '60 80' | |
| - name: Add Coverage PR Comment | |
| uses: marocchino/sticky-pull-request-comment@v2 | |
| if: github.event_name == 'pull_request' | |
| with: | |
| recreate: true | |
| path: code-coverage-results.md | |
| - name: Upload test results | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: test-results-${{ github.run_number }} | |
| path: ./TestResults | |
| - name: Upload coverage reports | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: coverage-reports-${{ github.run_number }} | |
| path: ./CodeCoverage |