File tree Expand file tree Collapse file tree 2 files changed +48
-1
lines changed Expand file tree Collapse file tree 2 files changed +48
-1
lines changed Original file line number Diff line number Diff line change 2020 run : rustup update stable
2121 - name : Install cargo-llvm-cov
2222 uses : taiki-e/install-action@cargo-llvm-cov
23+ - name : Install Clippy
24+ run : rustup component add clippy
25+ - name : Install cargo-sonar and run Clippy
26+ run : |
27+ cargo install cargo-sonar
28+ cargo clippy --message-format json > my-clippy-report.json
29+ cargo sonar --clippy --clippy-path my-clippy-report.json
2330 - name : Generate code coverage
2431 run : >
2532 cargo llvm-cov
3138 uses : actions/upload-artifact@v4
3239 with :
3340 name : coverage-report
34- path : lcov.info
41+ path : |
42+ lcov.info
43+ sonar-issues.json
3544
3645 codecov :
3746 name : Upload to Codecov
5463 files : coverage.out
5564 token : ${{ secrets.CODECOV_TOKEN }} # required
5665 verbose : true # optional (default = false)
66+
67+ sonarqube :
68+ name : SonarQube
69+ runs-on : ubuntu-latest
70+ needs : coverage
71+
72+ steps :
73+ - name : Checkout repository
74+ uses : actions/checkout@v5
75+ with :
76+ fetch-depth : 0
77+ - name : Download coverage artifact
78+ uses : actions/download-artifact@v5
79+ with :
80+ name : coverage-report
81+ - name : SonarCloud Scan
82+ uses : SonarSource/sonarqube-scan-action@master
83+ env :
84+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
85+ SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
86+ with :
87+ args : >
88+ -Dsonar.externalIssuesReportPaths=sonar-issues.json
89+ -Dcommunity.rust.lcov.reportPaths=lcov.info
Original file line number Diff line number Diff line change 1+ sonar.projectKey =sir-gon_algorithm-exercises-rust
2+ sonar.organization =sir-gon
3+
4+
5+ # This is the name and version displayed in the SonarCloud UI.
6+ # sonar.projectName=algorithm-exercises-rust
7+ # sonar.projectVersion=1.0
8+
9+
10+ # Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows.
11+ # sonar.sources=.
12+
13+ # Encoding of the source code. Default is default system encoding
14+ # sonar.sourceEncoding=UTF-8
You can’t perform that action at this time.
0 commit comments