@@ -16,27 +16,27 @@ jobs:
1616 linux-build :
1717 runs-on : ubuntu-latest
1818 steps :
19- - uses : actions/checkout@v4
19+ - uses : actions/checkout@v6
2020 with :
2121 fetch-depth : 0
2222 - name : Setup .NET
23- uses : actions/setup-dotnet@v4
23+ uses : actions/setup-dotnet@v5
2424 with :
25- dotnet-version : ' 9 .0.x'
25+ dotnet-version : ' 10 .0.x'
2626 - name : Set up JDK 17
27- uses : actions/setup-java@v4
27+ uses : actions/setup-java@v5
2828 with :
2929 java-version : 17
3030 distribution : ' zulu'
3131 - name : Cache SonarCloud packages
32- uses : actions/cache@v4
32+ uses : actions/cache@v5
3333 with :
3434 path : ~/sonar/cache
3535 key : ${{ runner.os }}-sonar
3636 restore-keys : ${{ runner.os }}-sonar
3737 - name : Cache SonarCloud scanner
3838 id : cache-sonar-scanner
39- uses : actions/cache@v4
39+ uses : actions/cache@v5
4040 with :
4141 path : ./.sonar/scanner
4242 key : ${{ runner.os }}-sonar-scanner
@@ -54,44 +54,39 @@ jobs:
5454 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
5555 SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
5656 shell : pwsh
57- run : ./.sonar/scanner/dotnet-sonarscanner begin /k:"dmako_CommonNetExtensions" /o:"dmako-github" /d:sonar.token="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.cs.opencover .reportsPaths="coverage/**/coverage.opencover .xml"
57+ run : ./.sonar/scanner/dotnet-sonarscanner begin /k:"dmako_CommonNetExtensions" /o:"dmako-github" /d:sonar.token="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.scanner.scanAll=false /d:sonar.cs.vscoveragexml .reportsPaths="coverage/*.xml"
5858 - name : Build Tests
5959 run : dotnet build --configuration Release --no-restore CommonNet.Extensions.Tests/CommonNet.Extensions.Tests.csproj
6060 - name : Tests
61- run : dotnet test --no-restore --configuration Release --no-build --verbosity normal -p:CollectCoverage=true --collect:"XPlat Code Coverage;Format=cobertura,opencover" --results-directory ./coverage CommonNet.Extensions.Tests/CommonNet.Extensions.Tests.csproj
61+ shell : pwsh
62+ run : |
63+ $currentDirectory = Get-Location
64+ dotnet test --no-restore --configuration Release --no-build --verbosity normal --framework net8.0 --results-directory $currentDirectory/coverage --coverage-output=$currentDirectory/coverage/CommonNet.Extensions.Tests.net8.0.xml --coverage-output-format=xml --coverage --project CommonNet.Extensions.Tests/CommonNet.Extensions.Tests.csproj
65+ dotnet test --no-restore --configuration Release --no-build --verbosity normal --framework net10.0 --results-directory $currentDirectory/coverage --coverage-output=$currentDirectory/coverage/CommonNet.Extensions.Tests.net10.0.xml --coverage-output-format=xml --coverage --project CommonNet.Extensions.Tests/CommonNet.Extensions.Tests.csproj
6266 - name : SonarCloud End
6367 env :
6468 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
6569 SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
6670 shell : pwsh
6771 run : ./.sonar/scanner/dotnet-sonarscanner end /d:sonar.token="${{ secrets.SONAR_TOKEN }}"
68- - name : Upload coverage reports to Codecov
69- uses : codecov/codecov-action@v4
70- with :
71- token : ${{ secrets.CODECOV_TOKEN }}
72- working-directory : coverage
73- flags : unittests
74- os : linux
7572 windows-build :
7673 runs-on : windows-latest
7774 steps :
78- - uses : actions/checkout@v4
75+ - uses : actions/checkout@v6
7976 with :
8077 fetch-depth : 0
8178 - name : Setup .NET
82- uses : actions/setup-dotnet@v4
79+ uses : actions/setup-dotnet@v5
8380 with :
84- dotnet-version : ' 9 .0.x'
81+ dotnet-version : ' 10 .0.x'
8582 - name : Install dependencies
8683 run : dotnet restore CommonNet.Extensions.Tests/CommonNet.Extensions.Tests.csproj
8784 - name : Build Tests
8885 run : dotnet build --configuration Release --no-restore CommonNet.Extensions.Tests/CommonNet.Extensions.Tests.csproj
8986 - name : Tests
90- run : dotnet test --no-restore --configuration Release --no-build --verbosity normal -p:CollectCoverage=true --collect:"XPlat Code Coverage;Format=cobertura" --results-directory ./coverage CommonNet.Extensions.Tests/CommonNet.Extensions.Tests.csproj
91- - name : Upload coverage reports to Codecov
92- uses : codecov/codecov-action@v4
93- with :
94- token : ${{ secrets.CODECOV_TOKEN }}
95- working-directory : coverage
96- flags : unittests
97- os : windows
87+ shell : pwsh
88+ run : |
89+ $currentDirectory = Get-Location
90+ dotnet test --no-restore --configuration Release --no-build --verbosity normal --framework net48 --results-directory $currentDirectory/coverage --coverage-output=$currentDirectory/coverage/CommonNet.Extensions.Tests.net48.xml --coverage-output-format=xml --coverage --project CommonNet.Extensions.Tests/CommonNet.Extensions.Tests.csproj
91+ dotnet test --no-restore --configuration Release --no-build --verbosity normal --framework net8.0 --results-directory $currentDirectory/coverage --coverage-output=$currentDirectory/coverage/CommonNet.Extensions.Tests.net8.0.xml --coverage-output-format=xml --coverage --project CommonNet.Extensions.Tests/CommonNet.Extensions.Tests.csproj
92+ dotnet test --no-restore --configuration Release --no-build --verbosity normal --framework net10.0 --results-directory $currentDirectory/coverage --coverage-output=$currentDirectory/coverage/CommonNet.Extensions.Tests.net10.0.xml --coverage-output-format=xml --coverage --project CommonNet.Extensions.Tests/CommonNet.Extensions.Tests.csproj
0 commit comments