chore(deps): bump the dependencies group across 1 directory with 2 updates #180
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-Debug | |
| on: | |
| push: | |
| branches: | |
| - "main" | |
| paths-ignore: | |
| - README.md | |
| pull_request: | |
| branches: | |
| - "main" | |
| jobs: | |
| build-dotnet: | |
| strategy: | |
| matrix: | |
| os: [ubuntu-24.04, windows-2025] | |
| permissions: | |
| contents: read | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: Cysharp/Actions/.github/actions/checkout@main | |
| - uses: Cysharp/Actions/.github/actions/setup-dotnet@main | |
| with: | |
| dotnet-version: | | |
| 6.0.x | |
| 8.0.x | |
| 9.0.x | |
| 10.0.x | |
| - run: dotnet build -c Release | |
| - run: dotnet test -c Release --no-build | |
| - run: dotnet build -c Release tests/System.Linq.Tests/System.Linq.Tests.slnx | |
| - run: dotnet test -c Release tests/System.Linq.Tests/System.Linq.Tests.slnx --no-build | |
| # can't pack with symbol options like `-p:IncludeSymbols=true` | |
| - run: dotnet pack -c Release --no-build -o $GITHUB_WORKSPACE/artifacts | |
| check-codecov-token: | |
| permissions: | |
| contents: read | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 10 | |
| outputs: | |
| run_codecoverage: ${{ steps.check-token.outputs.token_exists }} | |
| steps: | |
| - id: check-token | |
| shell: pwsh | |
| env: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
| run: | | |
| if(![string]::IsNullOrEmpty($env:CODECOV_TOKEN)) | |
| { | |
| echo "token_exists=true" >> $env:GITHUB_OUTPUT | |
| } | |
| else | |
| { | |
| echo "token_exists=false" >> $env:GITHUB_OUTPUT | |
| } | |
| code-coverage: | |
| if: ${{ needs.check-codecov-token.outputs.run_codecoverage == 'true' }} # secrets can't referenced in `if` so it needs separate job. | |
| needs: check-codecov-token | |
| permissions: | |
| contents: read | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: Cysharp/Actions/.github/actions/checkout@main | |
| - uses: Cysharp/Actions/.github/actions/setup-dotnet@main | |
| with: | |
| dotnet-version: | | |
| 10.0.x | |
| - run: | | |
| dotnet build -c Release | |
| dotnet build -c Release tests/System.Linq.Tests/System.Linq.Tests.slnx | |
| - name: Enable diagnostics (It's disabled by `Cysharp/Actions/.github/actions/setup-dotnet`) | |
| run: echo "COMPlus_EnableDiagnostics=1" >> $GITHUB_ENV | |
| - name: Install `dotnet-coverage` tool | |
| run: dotnet tool install -g dotnet-coverage | |
| - name: Collect code coverage | |
| shell: pwsh | |
| working-directory: tests | |
| run: | | |
| $PSNativeCommandUseErrorActionPreference = $true | |
| $sessionId = 'ZLinq' | |
| dotnet coverage collect --session-id $sessionId --nologo --settings codecoverage.runsettings --server-mode --background | |
| try | |
| { | |
| dotnet coverage connect $sessionId --nologo "dotnet test ../ -c Release --framework net10.0 --no-build" | |
| dotnet coverage connect $sessionId --nologo "dotnet test -c Release System.Linq.Tests/System.Linq.Tests.slnx --framework net10.0 --no-build" | |
| } | |
| finally | |
| { | |
| dotnet coverage shutdown $sessionId --nologo --timeout 60000 | |
| } | |
| # Upload coverage data to CodeCov | |
| - uses: codecov/codecov-action@e79a6962e0d4c0c17b229090214935d2e33f8354 # v6.0.1 | |
| with: | |
| fail_ci_if_error: false | |
| files: tests/TestResults/coverage.cobertura.xml | |
| token: ${{ secrets.CODECOV_TOKEN }} |