-
-
Notifications
You must be signed in to change notification settings - Fork 44
50 lines (43 loc) · 1.44 KB
/
sonarqube.yml
File metadata and controls
50 lines (43 loc) · 1.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
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@v6
with:
fetch-depth: '0'
- name: Set up JDK (x64)
uses: actions/setup-java@v5
with:
java-version: '21'
architecture: 'x64'
distribution: 'zulu'
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 }}
run: ./gradlew sonar --info