Skip to content

Commit 505985a

Browse files
committed
Move maven build action into Analyze workflow
1 parent 1a895d9 commit 505985a

File tree

2 files changed

+21
-25
lines changed

2 files changed

+21
-25
lines changed

.github/workflows/analyse.yml

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
name: SonarCloud
22
on:
3-
workflow_call:
4-
inputs: {}
3+
push:
4+
branches: [main]
55
pull_request:
66
types: [opened, synchronize, reopened]
7+
78
jobs:
89
analyze:
910
name: Analyze
@@ -29,11 +30,27 @@ jobs:
2930
path: ~/.m2
3031
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
3132
restore-keys: ${{ runner.os }}-m2
32-
- name: Download code coverage results
33-
uses: actions/download-artifact@v4
33+
34+
- name: "[Maven] Verify & generate JaCoCo XML"
35+
env:
36+
MAVEN_OPTS: '-Dstyle.color=always'
37+
MAVEN_SWITCHES: >-
38+
--show-version
39+
--no-transfer-progress
40+
--update-snapshots
41+
--fail-at-end
42+
--batch-mode
43+
run: mvn ${{ env.MAVEN_SWITCHES }} -P coverage verify
44+
45+
- name: Upload maven build result
46+
uses: actions/upload-artifact@v4
3447
with:
3548
name: maven-build-target-folder
3649
path: target
50+
51+
- name: List current location
52+
run: find .
53+
3754
- name: Analyze project
3855
env:
3956
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any

.github/workflows/ci.yml

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -36,27 +36,6 @@ jobs:
3636
uses: gradle/actions/setup-gradle@v3
3737
with:
3838
arguments: ${{ env.GRADLE_SWITCHES }} build test
39-
- name: "[Maven] Verify & generate JaCoCo XML"
40-
env:
41-
MAVEN_OPTS: '-Dstyle.color=always'
42-
MAVEN_SWITCHES: >-
43-
--show-version
44-
--no-transfer-progress
45-
--update-snapshots
46-
--fail-at-end
47-
--batch-mode
48-
run: mvn ${{ env.MAVEN_SWITCHES }} -P coverage verify
49-
50-
- name: Upload maven build result
51-
uses: actions/upload-artifact@v4
52-
with:
53-
name: maven-build-target-folder
54-
path: target
55-
56-
call:
57-
needs: [build]
58-
uses: './.github/workflows/analyse.yml'
59-
secrets: inherit
6039

6140
publish-snapshots:
6241
needs: [build]

0 commit comments

Comments
 (0)