Bump System.Memory from 4.5.4 to 4.6.3 #51
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: Test | |
| on: [push, pull_request] | |
| permissions: | |
| contents: read | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: | | |
| 6.0.x | |
| 8.0.x | |
| 9.0.x | |
| - name: Restore dependencies | |
| run: dotnet restore | |
| - name: Build | |
| run: dotnet build --no-restore | |
| - name: Test | |
| run: dotnet test --no-build --verbosity normal --collect:"XPlat Code Coverage" | |
| - name: Install ReportGenerator | |
| run: dotnet tool install --global dotnet-reportgenerator-globaltool | |
| - name: Check Code Coverage | |
| run: | | |
| reportgenerator -reports:"**/coverage.cobertura.xml" -targetdir:"coverage-report" -reporttypes:"JsonSummary" | |
| $json = Get-Content "coverage-report/Summary.json" | ConvertFrom-Json | |
| $lineRate = [math]::Round($json.summary.linecoverage, 2) | |
| Write-Host "Line Coverage: $lineRate%" | |
| if ($lineRate -lt 95) { | |
| Write-Error "Code coverage ($lineRate%) is below the required threshold of 95%" | |
| exit 1 | |
| } | |
| shell: pwsh | |
| - name: Upload coverage reports to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| files: '**/coverage.cobertura.xml' | |
| env: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |