Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add actions/checkout to publish-test-results #69

Merged
merged 1 commit into from
Dec 19, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Add actions/checkout to publish-test-results
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

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 4dfb9b95cbc75947bf3ca44f304151d521ddc08c
10 changes: 10 additions & 0 deletions .github/workflows/publish-test-results.yaml
Original file line number Diff line number Diff line change
@@ -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:
3 changes: 2 additions & 1 deletion .github/workflows/run-tests.yaml
Original file line number Diff line number Diff line change
@@ -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