Skip to content

Commit 959dddb

Browse files
committed
fix: Separate build and SonarCloud analysis steps
- Split verify and sonar:sonar into separate steps - Verify only builds selected modules (excluding authserver) - SonarCloud analysis runs at root level using sonar-project.properties - This ensures tests run properly while respecting module exclusions
1 parent 4232746 commit 959dddb

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,13 +151,15 @@ jobs:
151151
key: ${{ runner.os }}-sonar
152152
restore-keys: ${{ runner.os }}-sonar
153153

154-
- name: Build and analyze with SonarCloud
154+
- name: Build modules for SonarCloud
155+
run: mvn clean verify -pl openespi-common,openespi-datacustodian,openespi-thirdparty -am
156+
157+
- name: Analyze with SonarCloud
155158
env:
156159
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
157160
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
158161
run: |
159-
mvn clean verify sonar:sonar \
160-
-pl openespi-common,openespi-datacustodian,openespi-thirdparty \
162+
mvn sonar:sonar \
161163
-Dsonar.projectKey=GreenButtonAlliance_OpenESPI-GreenButton-Java \
162164
-Dsonar.organization=greenbuttonalliance \
163165
-Dsonar.host.url=https://sonarcloud.io \

.github/workflows/pr-checks.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,15 @@ jobs:
8080
key: ${{ runner.os }}-sonar
8181
restore-keys: ${{ runner.os }}-sonar
8282

83+
- name: Build modules for SonarCloud
84+
run: mvn clean verify -pl openespi-common,openespi-datacustodian,openespi-thirdparty -am
85+
8386
- name: Analyze with SonarCloud
8487
env:
8588
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8689
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
8790
run: |
88-
mvn clean verify sonar:sonar \
89-
-pl openespi-common,openespi-datacustodian,openespi-thirdparty \
91+
mvn sonar:sonar \
9092
-Dsonar.projectKey=GreenButtonAlliance_OpenESPI-GreenButton-Java \
9193
-Dsonar.organization=greenbuttonalliance \
9294
-Dsonar.host.url=https://sonarcloud.io \

0 commit comments

Comments
 (0)