-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add SonarCloud as a Scheduled GitHub Action
- addOns.gradle.kts > Modified so that jacoco reports include XML output. - build.gradle.kts > Modified to include sonarqube. - sonar.yml > Added to run a GitHub action workflow every Saturday in order to update the SonarCloud SAST results and coverage info. Signed-off-by: kingthorin <kingthorin@users.noreply.github.com>
- Loading branch information
1 parent
7667f74
commit 163bb56
Showing
3 changed files
with
49 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Run Sonar | ||
|
||
on: | ||
push: | ||
schedule: | ||
- cron: '30 15 * * SAT' | ||
|
||
jobs: | ||
sonar: | ||
runs-on: [ubuntu-latest] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Setup JDK 11 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 11 | ||
- name: Gradle Cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.gradle/caches | ||
~/.gradle/wrapper | ||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} | ||
restore-keys: | | ||
${{ runner.os }}-gradle- | ||
- name: Gradle Test & Coverage Report | ||
run: ./gradlew test jacocoTestReport -Dorg.gradle.jvmargs=-Xmx4096m | ||
- name: Sonarcloud Scan | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | ||
run: ./gradlew sonarqube --stacktrace |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters