Skip to content

Commit 964a337

Browse files
committed
Upload test results on every component build.
1 parent 60d33f7 commit 964a337

File tree

3 files changed

+13
-53
lines changed

3 files changed

+13
-53
lines changed

.github/workflows/component-build.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ name: Build flow
22

33
on: [workflow_call]
44

5+
permissions:
6+
actions: read
7+
checks: write
8+
59
jobs:
610
build:
711
runs-on: ubuntu-latest
@@ -30,4 +34,12 @@ jobs:
3034
with:
3135
name: test-artifact
3236
path: |
33-
**/build/test-results/**
37+
**/build/test-results/**
38+
- name: Test Report
39+
uses: dorny/test-reporter@v1
40+
if: success() || failure()
41+
with:
42+
artifact: test-artifact
43+
name: Junit Test
44+
path: ./**/TEST-*.xml
45+
reporter: java-junit

.github/workflows/main-build.yml

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ on:
77

88
permissions:
99
packages: write
10-
actions: read
11-
checks: write
1210

1311
jobs:
1412
build:
@@ -30,41 +28,4 @@ jobs:
3028
name: build-artifact
3129
- name: Quality gate
3230
run: ./gradlew sonar -Dsonar.token=${{ secrets.SONAR_TOKEN }} -Dsonar.gradle.skipCompile=true -Dsonar.host.url=https://sonarcloud.io
33-
snapshot:
34-
runs-on: ubuntu-latest
35-
needs: build
36-
steps:
37-
- uses: actions/checkout@v4
38-
- name: Configure Java version
39-
uses: actions/setup-java@v4
40-
with:
41-
java-version: '21'
42-
distribution: 'temurin'
43-
architecture: x64
44-
- name: Download build artifact
45-
uses: actions/download-artifact@v4
46-
with:
47-
name: build-artifact
48-
- name: Publish artifacts
49-
run: |
50-
echo "Github ref: ${GITHUB_REF}"
51-
NEW_VERSION=$(echo "${GITHUB_REF}" | cut -d "/" -f3)
52-
echo "Github username: ${GITHUB_ACTOR}"
53-
./gradlew -Pversion=1.0.0-SNAPSHOT publish -x check
54-
env:
55-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
56-
test-report:
57-
runs-on: ubuntu-latest
58-
needs: build
59-
steps:
60-
- uses: actions/checkout@v4
61-
- name: test-report
62-
uses: dorny/test-reporter@v1
63-
if: success() || failure()
64-
with:
65-
artifact: test-artifact
66-
name: Junit Test
67-
path: ./**/TEST-*.xml
68-
reporter: java-junit
69-
7031

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

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,6 @@ permissions:
1212
jobs:
1313
build:
1414
uses: ./.github/workflows/component-build.yml
15-
test-report:
16-
runs-on: ubuntu-latest
17-
needs: build
18-
steps:
19-
- uses: actions/checkout@v4
20-
- name: test-report
21-
uses: dorny/test-reporter@v1
22-
if: success() || failure()
23-
with:
24-
artifact: test-artifact
25-
name: Junit Test
26-
path: ./**/TEST-*.xml
27-
reporter: java-junit
2815
code-quality:
2916
runs-on: ubuntu-latest
3017
needs: build

0 commit comments

Comments
 (0)