-
Notifications
You must be signed in to change notification settings - Fork 200
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
Artifacts are not visible for the test-reporter plugin #437
Comments
Why have you surrounded the path with slashes (
If you want to quote the value in YAML, the quotes would have to surround everything (
However, this glob expression would still be a bad idea, as it would effectively scan your entire disk. So you should probably rather use the following:
Besides, I have no idea if the action supports specifying an absolute directory. You may otherwise try to download the artifact to the current working directory by using relative paths, instead of |
About surrounding the I applied the changes for the path, and also provided the full absolute directory using the My current yml file looks currently the following way:
|
Mhh, I noticed few more potential problems:
Here is a version where I applied the changes. For the Show adjusted workflow filename: Java CI with Maven
on:
push:
branches:
- master
pull_request:
branches:
- master
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'adopt'
- name: Build with Maven
run: mvn -B clean install
- name: Run tests
run: mvn test -Dsurefire.reports.directory=$PWD/target/surefire-reports
- name: Archive test results
uses: actions/upload-artifact@v2
with:
name: test-results
path: target/surefire-reports/
report:
runs-on: ubuntu-latest
needs: build
steps:
# We have to clone the repo as the test-reporter otherwise runs into an error.
# See https://github.com/dorny/test-reporter/issues/131#issuecomment-2093880211
- uses: actions/checkout@v4
# We have to manually download the artifact because dorny/test-reporter@v1
# does not see the artifacts uploaded by actions/upload-artifact@v3 and below before the end of the workflow.
# The action dorny/test-reporter@v1 does also not support artifacts uploaded by actions/upload-artifact@v4.
# See https://github.com/dorny/test-reporter/issues/343
- name: Download test results artifact
uses: actions/download-artifact@v2
with:
name: test-results
path: target/surefire-reports
- name: List downloaded artifacts
run: ls -R target/surefire-reports
- name: Generate test report
uses: dorny/test-reporter@v1
with:
name: 'Test report $1'
path: target/surefire-reports/**.xml
reporter: java-junit
fail-on-empty: 'false' |
I am closing this issue as this is an error in the setup of the workflow itself. Thanks @JojOatXGME for you valuable troubleshooting steps to help resolve this issue. |
Describe the bug
Cannot find any artifacts if the junit parser is applied.
To Reproduce
Steps to reproduce the behavior:
Currently I have a gh worflow as the following:
https://github.com/inBrackets/JavaAlgorithms/blob/master/.github/workflows/maven.yml
As an output I get a warning that no artifacts were found despite they were listed explicitly in the previous step (List downloaded artifacts)
Expected behavior
The artifacts should be visible
Screenshots
Additional context
The "report" job passes only because the fail-on-empty is set to false
The text was updated successfully, but these errors were encountered: