Skip to content

Commit fd39b07

Browse files
committed
Adjust build process
Adjust the build process to only run for coverage whenever the sonar-enabled property is set to true
1 parent c4e5407 commit fd39b07

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

.github/workflows/main.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,19 @@ jobs:
4141
${{ runner.os }}-maven
4242
4343
- name: Regular Build
44+
if: ${{ !matrix.sonar-enabled }}
4445
run: |
45-
./mvnw -B -U clean verify
46+
./mvnw -B -U clean verify
47+
48+
- name: Build with Coverage reports
49+
if: matrix.sonar-enabled
50+
run: |
51+
./mvnw -B -U -Dcoverage clean verify
4652
4753
- name: Sonar Analysis
4854
if: matrix.sonar-enabled
4955
run: |
50-
./mvnw -B -Pcoverage sonar:sonar \
56+
./mvnw -B sonar:sonar \
5157
-Dsonar.projectKey=AxonFramework_extension-kotlin \
5258
-Dsonar.organization=axonframework \
5359
-Dsonar.host.url=https://sonarcloud.io \

.github/workflows/pullrequest.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,19 @@ jobs:
3838
${{ runner.os }}-maven
3939
4040
- name: Regular Build
41+
if: ${{ !matrix.sonar-enabled }}
4142
run: |
42-
./mvnw -B -U clean verify
43+
./mvnw -B -U clean verify
44+
45+
- name: Build with Coverage reports
46+
if: matrix.sonar-enabled
47+
run: |
48+
./mvnw -B -U -Possrh -Dcoverage clean verify
4349
4450
- name: Sonar Analysis
4551
if: ${{ success() && matrix.sonar-enabled && github.event.pull_request.head.repo.full_name == github.repository }}
4652
run: |
47-
./mvnw -B -Pcoverage sonar:sonar \
53+
./mvnw -B sonar:sonar \
4854
-Dsonar.projectKey=AxonFramework_extension-kotlin \
4955
-Dsonar.organization=axonframework \
5056
-Dsonar.host.url=https://sonarcloud.io \

0 commit comments

Comments
 (0)