Skip to content

Commit 3ca5921

Browse files
committed
[chore]add report step
1 parent 8adf373 commit 3ca5921

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

.github/workflows/build.yaml

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ on:
1313
jobs:
1414
build:
1515
runs-on: ubuntu-latest
16+
permissions:
17+
contents: read
18+
checks: write
1619

1720
env:
1821
MAVEN_OPTS: -Xmx2g
@@ -32,19 +35,19 @@ jobs:
3235
run: |
3336
mvn test \
3437
--batch-mode \
35-
--fail-at-end \
36-
-Dsurefire.useFile=false
38+
--fail-at-end
39+
40+
- name: Report test results
41+
uses: dorny/test-reporter@v1
42+
if: always()
43+
with:
44+
name: Maven Tests
45+
path: "**/target/surefire-reports/*.xml"
46+
reporter: java-junit
47+
fail-on-error: "false"
3748

3849
- name: Build project
3950
run: |
4051
mvn package \
4152
--batch-mode \
4253
-DskipTests=true
43-
44-
- name: Upload test results
45-
if: always()
46-
uses: actions/upload-artifact@v4
47-
with:
48-
name: test-results
49-
path: '**/target/surefire-reports/*.xml'
50-
retention-days: 7

0 commit comments

Comments
 (0)