ci(v2.1): add dedicated net10+net11 preview pipeline; docs: union typ… #1
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
| # CI for the v2.1 preview branch: builds and tests the multi-targeted (net10.0;net11.0) | |
| # core + tests on both target frameworks. Kept separate from ci.yml so the net10-only | |
| # master pipeline is never affected by the .NET 11 RC SDK pin in this branch's global.json. | |
| name: CI v2.1 Preview (.NET 11) | |
| on: | |
| push: | |
| branches: [ release/v2.1.0.0-preview.1 ] | |
| pull_request: | |
| branches: [ release/v2.1.0.0-preview.1 ] | |
| permissions: | |
| contents: read | |
| env: | |
| DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true | |
| DOTNET_CLI_TELEMETRY_OPTOUT: true | |
| DOTNET_NOLOGO: true | |
| CI_TEST_FILTER: 'Category!=Debug&Category!=Manual&Category!=Performance' | |
| jobs: | |
| build-test: | |
| name: Build + Test (${{ matrix.framework }}) | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 45 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ ubuntu-latest, windows-latest ] | |
| framework: [ net10.0, net11.0 ] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| with: | |
| fetch-depth: 0 | |
| # The branch's global.json pins the .NET 11 RC SDK, so install both SDKs. The RC SDK | |
| # builds the net10.0 target as well (SDKs are backwards compatible). | |
| - name: Setup .NET 10 | |
| uses: actions/setup-dotnet@v6 | |
| with: | |
| dotnet-version: '10.0.x' | |
| - name: Setup .NET 11 (RC) | |
| uses: actions/setup-dotnet@v6 | |
| with: | |
| dotnet-version: '11.0.100-rc.1' | |
| include-prerelease: true | |
| - name: Display .NET info | |
| run: dotnet --info | |
| - name: Restore dependencies | |
| run: dotnet restore tests/SharpCoreDB.Tests/SharpCoreDB.Tests.csproj --configfile NuGet.Config | |
| - name: Build (${{ matrix.framework }}) | |
| run: dotnet build tests/SharpCoreDB.Tests/SharpCoreDB.Tests.csproj --configuration Release --framework ${{ matrix.framework }} --no-restore | |
| # MTP (xunit.v3) test hosts no longer support `dotnet test`'s VSTest flags; run the | |
| # MTP executable directly, which understands the same VSTest filter expression and writes TRX. | |
| - name: Test (${{ matrix.framework }}) | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| mkdir -p ./TestResults/SharpCoreDB.Tests/${{ matrix.framework }} | |
| tests/SharpCoreDB.Tests/bin/Release/${{ matrix.framework }}/SharpCoreDB.Tests \ | |
| -filterVSTest "${{ env.CI_TEST_FILTER }}" \ | |
| -result-trx "./TestResults/SharpCoreDB.Tests/${{ matrix.framework }}/SharpCoreDB.Tests.trx" | |
| timeout-minutes: 30 | |
| env: | |
| CI: "true" | |
| GITHUB_ACTIONS: "true" |