Skip to content

Commit ad301e9

Browse files
committed
Align GHA for main and pull-request
Align GHA for main and pull-request by: - defining continue-on-error to true for main gha - by adding -Dstyle.color=always to all runs - only run Sonatype step if deploy-enabled is true - defining fail-fast to false pull request gha
1 parent 3574323 commit ad301e9

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

.github/workflows/main.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ jobs:
1111
build:
1212
name: Test and Build on JDK ${{ matrix.java-version }}
1313
runs-on: ubuntu-latest
14+
continue-on-error: true # do not fail the whole job if one of the steps fails
15+
1416
strategy:
1517
matrix:
1618
include:
@@ -36,17 +38,17 @@ jobs:
3638
- name: Regular Build
3739
if: ${{ !matrix.sonar-enabled }}
3840
run: |
39-
./mvnw -B -U clean verify
41+
./mvnw -B -U -Dstyle.color=always clean verify
4042
4143
- name: Build with Coverage reports
4244
if: matrix.sonar-enabled
4345
run: |
44-
./mvnw -B -U -Dcoverage clean verify
46+
./mvnw -B -U -Dstyle.color=always -Dcoverage clean verify
4547
4648
- name: Sonar Analysis
4749
if: matrix.sonar-enabled
4850
run: |
49-
./mvnw -B sonar:sonar \
51+
./mvnw -B -Dstyle.color=always sonar:sonar \
5052
-Dsonar.projectKey=AxonFramework_extension-kotlin \
5153
-Dsonar.organization=axonframework \
5254
-Dsonar.host.url=https://sonarcloud.io \
@@ -55,9 +57,9 @@ jobs:
5557
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5658

5759
- name: Deploy to Sonatype
58-
if: success()
60+
if: success() && ${{ matrix.deploy-enabled }}
5961
run: |
60-
./mvnw -B -U deploy -DskipTests=true
62+
./mvnw -B -U -Dstyle.color=always deploy -DskipTests=true
6163
env:
6264
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6365
MAVEN_USERNAME: ${{ secrets.SONATYPE_TOKEN_ID }}

.github/workflows/pullrequest.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,17 +33,17 @@ jobs:
3333
- name: Regular Build
3434
if: ${{ !matrix.sonar-enabled }}
3535
run: |
36-
./mvnw -B -U clean verify
36+
./mvnw -B -U -Dstyle.color=always clean verify
3737
3838
- name: Build with Coverage reports
3939
if: matrix.sonar-enabled
4040
run: |
41-
./mvnw -B -U -Possrh -Dcoverage clean verify
41+
./mvnw -B -U -Dstyle.color=always -Possrh -Dcoverage clean verify
4242
4343
- name: Sonar Analysis
4444
if: ${{ success() && matrix.sonar-enabled && github.event.pull_request.head.repo.full_name == github.repository }}
4545
run: |
46-
./mvnw -B sonar:sonar \
46+
./mvnw -B -Dstyle.color=always sonar:sonar \
4747
-Dsonar.projectKey=AxonFramework_extension-kotlin \
4848
-Dsonar.organization=axonframework \
4949
-Dsonar.host.url=https://sonarcloud.io \

0 commit comments

Comments
 (0)