Skip to content

Commit

Permalink
Add actions/checkout to publish-test-results
Browse files Browse the repository at this point in the history
The overall "Publish Test Results" run for #68 failed, but _after_ that
change caused the "Download test results" step to pass:

- https://github.com/mbland/tomcat-servlet-testing-example/actions/runs/7268307692/job/19803882107

Tracing through the code, it seems that dorny/test-reporter does the
following:

- When `artifact:` is specified, it will check out the repo at
  github.event.workflow_run.head_commit.id.
- When `artifact:` is _not_ specified, it assumes the repo is already
  present.

This should, hopefully, provide the last missing piece for the test
reporter to run successfully.
  • Loading branch information
mbland committed Dec 19, 2023
1 parent dc4f4fa commit 4dfb9b9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
10 changes: 10 additions & 0 deletions .github/workflows/publish-test-results.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,16 @@ jobs:
report:
runs-on: ubuntu-latest
steps:
# dorny/test-reporter has an `artifact:` attribute that will check out the
# repo and download test results automatically. However,
# dorny/test-reporter@v1 wasn't compatible with the bump to
# actions/upload-artifact@v4 in run-tests.yaml. So we manually check
# out the repo and download the results to avoid the rev lock.
- name: Check out repository
uses: actions/checkout@v4
with:
ref: ${{ github.event.workflow_run.head_commit.id }}

- name: Download test results
uses: actions/download-artifact@v4
with:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/run-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ jobs:
name: "Run Tests"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check out repository
uses: actions/checkout@v4

- name: Set up Java
uses: actions/setup-java@v4
Expand Down

0 comments on commit 4dfb9b9

Please sign in to comment.