Skip to content

Commit aaff637

Browse files
committed
Update build pipeline to use latest version of gradle action and include test results.
1 parent 280b7f9 commit aaff637

File tree

3 files changed

+31
-4
lines changed

3 files changed

+31
-4
lines changed

.github/workflows/component-build.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ jobs:
1313
java-version: '21'
1414
distribution: 'temurin'
1515
architecture: x64
16-
- name: Setup Gradle
17-
uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5
18-
- name: Build code
19-
run: ./gradlew check
16+
- name: Build the application
17+
uses: gradle/actions/setup-gradle@v3
18+
with:
19+
arguments: 'check'
2020
- name: Upload build results
2121
uses: actions/upload-artifact@v4
2222
with:

.github/workflows/main-build.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,18 @@ jobs:
4747
./gradlew -Pversion=1.0.0-SNAPSHOT publish -x check
4848
env:
4949
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
50+
test-report:
51+
runs-on: ubuntu-latest
52+
needs: build
53+
steps:
54+
- uses: actions/checkout@v4
55+
- name: test-report
56+
uses: dorny/test-reporter@v1
57+
if: success() || failure()
58+
with:
59+
artifact: test-artifact
60+
name: Junit Test
61+
path: ./**/TEST-*.xml
62+
reporter: java-junit
63+
5064

.github/workflows/pull-request-gate.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,19 @@ on:
88
jobs:
99
build:
1010
uses: ./.github/workflows/component-build.yml
11+
test-report:
12+
runs-on: ubuntu-latest
13+
needs: build
14+
steps:
15+
- uses: actions/checkout@v4
16+
- name: test-report
17+
uses: dorny/test-reporter@v1
18+
if: success() || failure()
19+
with:
20+
artifact: test-artifact
21+
name: Junit Test
22+
path: ./**/TEST-*.xml
23+
reporter: java-junit
1124
code-quality:
1225
runs-on: ubuntu-latest
1326
needs: build

0 commit comments

Comments
 (0)