Skip to content

Commit 8ab202e

Browse files
committed
Investigate missing test-result reports
Test results are not published properly due to an "There is no pull request for commit <...>" error, indicating a problem with visibility and or accessability...
1 parent 8cf84a0 commit 8ab202e

File tree

2 files changed

+20
-6
lines changed

2 files changed

+20
-6
lines changed

.github/workflows/maven.yaml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,29 +22,38 @@ jobs:
2222
name: OS ${{ matrix.os }} Java ${{ matrix.java }} compile
2323
timeout-minutes: 90
2424
steps:
25-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
25+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2626
with:
2727
fetch-depth: 0
2828
- name: Set up JDK 17/21
29-
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00
29+
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
3030
with:
3131
distribution: 'temurin' # See 'Supported distributions' for available options
3232
java-version: ${{ matrix.java }}
3333
cache: 'maven'
3434
- name: Set up Maven
35-
uses: stCarolas/setup-maven@d6af6abeda15e98926a57b5aa970a96bb37f97d1
35+
uses: stCarolas/setup-maven@d6af6abeda15e98926a57b5aa970a96bb37f97d1 # v5
3636
with:
3737
maven-version: 3.9.2
3838
- name: Build with Maven
39-
uses: coactions/setup-xvfb@b6b4fcfb9f5a895edadc3bc76318fae0ac17c8b3
39+
uses: coactions/setup-xvfb@b6b4fcfb9f5a895edadc3bc76318fae0ac17c8b3 # v1.0.1
4040
with:
4141
run: >-
4242
mvn -V -B -fae -ntp clean verify
4343
- name: Upload Test Results for Java-${{ matrix.java }}
44-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
44+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
4545
if: always()
4646
with:
4747
name: test-results-${{ matrix.os }}-java${{ matrix.java }}
4848
if-no-files-found: error
4949
path: |
5050
${{ github.workspace }}/**/target/surefire-reports/*.xml
51+
event_file:
52+
name: "Upload Event File"
53+
runs-on: ubuntu-latest
54+
steps:
55+
- name: Upload
56+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
57+
with:
58+
name: Event File
59+
path: ${{ github.event_path }}

.github/workflows/unit-tests.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ jobs:
1515
permissions:
1616
checks: write
1717
pull-requests: write
18+
contents: read
19+
issues: read
20+
actions: read
1821

1922
steps:
2023
- name: Download and Extract Artifacts
@@ -33,9 +36,11 @@ jobs:
3336
done
3437
3538
- name: Publish Unit Test Results
36-
uses: EnricoMi/publish-unit-test-result-action@afb2984f4d89672b2f9d9c13ae23d53779671984
39+
uses: EnricoMi/publish-unit-test-result-action@afb2984f4d89672b2f9d9c13ae23d53779671984 # v2.19.0
3740
with:
3841
commit: ${{ github.event.workflow_run.head_sha }}
42+
event_file: artifacts/Event File/event.json
43+
event_name: ${{ github.event.workflow_run.event }}
3944
files: "artifacts/**/*.xml"
4045

4146

0 commit comments

Comments
 (0)