Skip to content

Commit 272d4d0

Browse files
author
Mihkel Kivisild
committed
Updated GitHub Actions to latest versions & allowing SonarCloud analysis to run on external pull requests
WE2-963 WE2-1011 Signed-off-by: Mihkel Kivisild <[email protected]>
1 parent bbd6281 commit 272d4d0

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

.github/workflows/coverity-analysis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
- name: Setup dotnet
2424
uses: actions/setup-dotnet@v4
2525
with:
26-
dotnet-version: 6.0.x # SDK Version to use.
26+
dotnet-version: 8.0.x # SDK Version to use.
2727

2828
- name: Cache Nuget packages
2929
uses: actions/cache@v4

.github/workflows/dotnet-build-windows.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ jobs:
1515
dotnet-version: 8.0.x # SDK Version to use.
1616

1717
- name: Setup MSBuild
18-
uses: microsoft/setup-msbuild@v1.1
18+
uses: microsoft/setup-msbuild@v2
1919
with:
20-
vs-version: 17.1 # Visual Studio Version to use.
20+
vs-version: 17.11 # Visual Studio Version to use.
2121

2222
- name: Setup VSTest
23-
uses: darenm/Setup-VSTest@v1.2
23+
uses: darenm/Setup-VSTest@v1.3
2424

2525
- name: Cache Nuget packages
2626
uses: actions/cache@v4

.github/workflows/sonarcloud-analysis.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: SonarCloud code analysis
22

3-
on: [push]
3+
on: [push, pull_request, pull_request_target]
44

55
jobs:
66
analyze:
@@ -16,7 +16,7 @@ jobs:
1616
- name: Setup dotnet
1717
uses: actions/setup-dotnet@v4
1818
with:
19-
dotnet-version: 6.0.x # SDK Version to use.
19+
dotnet-version: 8.0.x # SDK Version to use.
2020

2121
- name: Set up JDK 21
2222
uses: actions/setup-java@v4
@@ -63,7 +63,7 @@ jobs:
6363
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
6464
shell: powershell
6565
run: |
66-
.\.sonar\scanner\dotnet-sonarscanner begin /k:"web-eid_web-eid-authtoken-validation-dotnet" /o:"web-eid" /d:sonar.cs.opencover.reportsPaths="**/TestResults/**/coverage.opencover.xml" -d:sonar.cs.vstest.reportsPaths="**/TestResults/*.trx" /d:sonar.verbose=true /d:sonar.login="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io"
66+
.\.sonar\scanner\dotnet-sonarscanner begin /k:"web-eid_web-eid-authtoken-validation-dotnet" /o:"web-eid" /d:sonar.cs.opencover.reportsPaths="**/TestResults/**/coverage.opencover.xml" -d:sonar.cs.vstest.reportsPaths="**/TestResults/*.trx" /d:sonar.verbose=true /d:sonar.host.url="https://sonarcloud.io"
6767
dotnet build --configuration Release --no-restore src/WebEid.Security.sln
6868
dotnet test src/WebEid.Security.sln --logger trx --collect:"XPlat Code Coverage" -- DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=opencover --results-directory "TestResults"
69-
.\.sonar\scanner\dotnet-sonarscanner end /d:sonar.login="${{ secrets.SONAR_TOKEN }}"
69+
.\.sonar\scanner\dotnet-sonarscanner end

0 commit comments

Comments
 (0)