Skip to content

Commit 376d126

Browse files
committed
ci: Use the new environment setup and streamline sonarcube scan
1 parent e4986d1 commit 376d126

File tree

2 files changed

+11
-14
lines changed

2 files changed

+11
-14
lines changed

.github/workflows/run_maven_tests.yml

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,30 +17,27 @@ jobs:
1717
- uses: actions/checkout@v4
1818
with:
1919
fetch-depth: 0
20-
- name: Set up JDK 17
21-
uses: actions/setup-java@v4
20+
- name: Setup build environment
21+
uses: ./.github/actions/setup-build-environment
2222
with:
23-
distribution: 'temurin'
24-
java-version: '17'
23+
with_docker: 'false'
2524
- name: Cache SonarCloud packages
2625
uses: actions/cache@v4
2726
with:
2827
path: ~/.sonar/cache
2928
key: ${{ runner.os }}-sonar-${{ hashFiles('**/pom.xml') }}
3029
restore-keys: ${{ runner.os }}-sonar
31-
- name: Cache Maven packages
32-
uses: actions/cache@v4
33-
with:
34-
path: ~/.m2
35-
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
36-
restore-keys: ${{ runner.os }}-m2
37-
- name: Download maven dependencies
38-
run: ./mvnw install -Dmaven.test.skip=true -B dependency:go-offline dependency:resolve-plugins dependency:resolve -q
3930
- name: run unit tests
40-
run: ./mvnw -B verify -Papitests -T $(nproc) -DCI=true
31+
run: ./mvnw -B install -Papitests -T $(nproc) -DCI=true
4132
- name: Run the unit tests a second time with jacoco
4233
run: |
4334
# Ensure test stability across graph reloads.
4435
./mvnw -B verify -Papitests -T $(nproc) jacoco:report
4536
- name: 'Prepare Sonar analysis'
4637
uses: evaristegalois11/sonar-fork-analysis@v1
38+
with:
39+
distribution: 'temurin'
40+
java-version: '21'
41+
github-token: ${{ secrets.GITHUB_TOKEN }}
42+
sonar-token: ${{ secrets.SONAR_TOKEN }}
43+
project-key: 'GIScience_openrouteservice'

.github/workflows/sonarcube-scan.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
uses: evaristegalois11/sonar-fork-analysis@v1
1717
with:
1818
distribution: 'temurin'
19-
java-version: '17'
19+
java-version: '21'
2020
github-token: ${{ secrets.GITHUB_TOKEN }}
2121
sonar-token: ${{ secrets.SONAR_TOKEN }}
2222
project-key: 'GIScience_openrouteservice'

0 commit comments

Comments
 (0)