-
-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #509 from jamesmudd/sonar-java-17
SonarQube GHA
- Loading branch information
Showing
2 changed files
with
58 additions
and
37 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,51 @@ | ||
name: SonarQube | ||
on: | ||
# Trigger analysis when pushing to your main branches, and when creating a pull request. | ||
push: | ||
branches: | ||
- main | ||
- master | ||
- develop | ||
- 'releases/**' | ||
pull_request: | ||
types: [opened, synchronize, reopened] | ||
|
||
jobs: | ||
sonarqube: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: '0' | ||
|
||
- name: Set up JDK (x64) | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '17' | ||
architecture: 'x64' | ||
distribution: 'temurin' | ||
cache: 'gradle' | ||
|
||
- name: Build | ||
working-directory: jhdf | ||
run: ./gradlew build | ||
|
||
- name: Checkstyle | ||
working-directory: jhdf | ||
run: ./gradlew checkstyleMain checkstyleTest | ||
|
||
- name: SpotBugs | ||
working-directory: jhdf | ||
run: ./gradlew spotbugsMain spotbugsTest | ||
|
||
- name: Jacoco Coverage Report | ||
working-directory: jhdf | ||
run: ./gradlew jacocoTestReport | ||
|
||
- name: Sonar | ||
working-directory: jhdf | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | ||
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} | ||
run: ./gradlew sonar --info |
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