File tree Expand file tree Collapse file tree 1 file changed +48
-0
lines changed Expand file tree Collapse file tree 1 file changed +48
-0
lines changed Original file line number Diff line number Diff line change 1+ name : SonarCloud
2+ on :
3+ push :
4+ branches :
5+ - main
6+ pull_request :
7+ types : [opened, synchronize, reopened]
8+ jobs :
9+ build :
10+ name : Build and analyze
11+ runs-on : windows-latest
12+ steps :
13+ - name : Set up JDK 17
14+ uses : actions/setup-java@v4
15+ with :
16+ java-version : 17
17+ distribution : ' zulu'
18+ - uses : actions/checkout@v4
19+ with :
20+ fetch-depth : 0
21+ - name : Cache SonarCloud packages
22+ uses : actions/cache@v4
23+ with :
24+ path : ~\sonar\cache
25+ key : ${{ runner.os }}-sonar
26+ restore-keys : ${{ runner.os }}-sonar
27+ - name : Cache SonarCloud scanner
28+ id : cache-sonar-scanner
29+ uses : actions/cache@v4
30+ with :
31+ path : .\.sonar\scanner
32+ key : ${{ runner.os }}-sonar-scanner
33+ restore-keys : ${{ runner.os }}-sonar-scanner
34+ - name : Install SonarCloud scanner
35+ if : steps.cache-sonar-scanner.outputs.cache-hit != 'true'
36+ shell : powershell
37+ run : |
38+ New-Item -Path .\.sonar\scanner -ItemType Directory
39+ dotnet tool update dotnet-sonarscanner --tool-path .\.sonar\scanner
40+ - name : Build and analyze
41+ env :
42+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
43+ SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
44+ shell : powershell
45+ run : |
46+ .\.sonar\scanner\dotnet-sonarscanner begin /k:"Exarilo_Flow.Launcher.Plugin.AppUpgrader" /o:"exarilo" /d:sonar.token="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.scanner.scanAll=false /d:sonar.coverage.exclusions="**/*"
47+ dotnet build
48+ .\.sonar\scanner\dotnet-sonarscanner end /d:sonar.token="${{ secrets.SONAR_TOKEN }}"
You can’t perform that action at this time.
0 commit comments