Error fixes #80
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: PR Tests - Windows | |
| on: | |
| pull_request: | |
| branches: [ main ] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| runs-on: windows-latest | |
| strategy: | |
| matrix: | |
| include: | |
| - dotnet-version: 6.0 | |
| tfm: net6.0 | |
| - dotnet-version: 7.0 | |
| tfm: net7.0 | |
| - dotnet-version: 8.0 | |
| tfm: net8.0 | |
| - dotnet-version: 9.0 | |
| tfm: net9.0 | |
| - dotnet-version: 10.0 | |
| tfm: net10.0 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: | | |
| 6.0.x | |
| 7.0.x | |
| 8.0.x | |
| 9.0.x | |
| 10.0.x | |
| - name: Setup Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Build Rust native (Windows) | |
| working-directory: cas-core-lib | |
| run: cargo build --release | |
| - name: Stage native lib for tests | |
| shell: pwsh | |
| run: | | |
| $outDir = "cas-dotnet-sdk-tests\bin\Release\${{ matrix.tfm }}" | |
| New-Item -ItemType Directory -Force -Path $outDir | Out-Null | |
| Copy-Item "cas-core-lib/target/release/cas_core_lib.dll" -Destination $outDir -Force | |
| Get-ChildItem $outDir | |
| - name: Run tests (override framework) | |
| run: | | |
| echo "Running tests for framework ${{ matrix.tfm }}" | |
| dotnet test ./cas-dotnet-sdk-tests/cas-dotnet-sdk-tests.csproj -c Release -f ${{ matrix.tfm }} --logger "trx" |