|
17 | 17 | fail-fast: false |
18 | 18 | max-parallel: 3 |
19 | 19 | matrix: |
20 | | - dotnet: ['6.0.x', '5.0.x'] |
| 20 | + dotnet: ['6.0.x', '8.0.x', '9.0.x', '10.0.x'] |
| 21 | + include: |
| 22 | + - dotnet: '6.0.x' |
| 23 | + target-framework: 'net6.0' |
| 24 | + - dotnet: '8.0.x' |
| 25 | + target-framework: 'net8.0' |
| 26 | + - dotnet: '9.0.x' |
| 27 | + target-framework: 'net9.0' |
| 28 | + - dotnet: '10.0.x' |
| 29 | + target-framework: 'net10.0' |
21 | 30 | os: [ windows-latest ] |
22 | 31 | name: SpecFlow Repo ${{ matrix.dotnet }} - ${{ matrix.os }} Sample |
23 | 32 | env: |
@@ -49,17 +58,26 @@ jobs: |
49 | 58 | } |
50 | 59 | - name: Setup dotnet |
51 | 60 | uses: actions/setup-dotnet@v3 |
| 61 | + id: setup-dotnet |
52 | 62 | with: |
53 | 63 | dotnet-version: ${{ matrix.dotnet }} |
54 | 64 |
|
| 65 | + - name: Pin SDK version via global.json |
| 66 | + run: | |
| 67 | + $major = "${{ matrix.target-framework }}".Replace("net","").Split(".")[0] |
| 68 | + $version = "$major.0.100" |
| 69 | + "{`"sdk`":{`"version`":`"$version`",`"rollForward`":`"latestFeature`"}}" | Set-Content global.json |
| 70 | + Get-Content global.json |
| 71 | + shell: pwsh |
| 72 | + |
55 | 73 | - name: Install dependencies |
56 | | - run: dotnet build |
| 74 | + run: dotnet build /p:TargetFrameworks=${{ matrix.target-framework }} /p:TargetFramework=${{ matrix.target-framework }} |
57 | 75 |
|
58 | 76 | - name: Run sample tests |
59 | | - run: dotnet test --filter "Category=sample-test" |
| 77 | + run: dotnet test --filter "Category=sample-test" /p:TargetFrameworks=${{ matrix.target-framework }} /p:TargetFramework=${{ matrix.target-framework }} |
60 | 78 |
|
61 | 79 | - name: Run local tests |
62 | | - run: dotnet test --filter "Category=sample-local-test" |
| 80 | + run: dotnet test --filter "Category=sample-local-test" /p:TargetFrameworks=${{ matrix.target-framework }} /p:TargetFramework=${{ matrix.target-framework }} |
63 | 81 |
|
64 | 82 | - if: always() |
65 | 83 | uses: actions/github-script@98814c53be79b1d30f795b907e553d8679345975 |
|
0 commit comments