Comments (8)
Sorry, I had to revert that feature as it introduced some regression: #124
from publish-unit-test-result-action.
Good point, this is a limitation of the used glob library. #121 fixes this, among other improvements.
from publish-unit-test-result-action.
This has been released and is available as uses: EnricoMi/publish-unit-test-result-action@v1
.
Thanks for raising this issue.
from publish-unit-test-result-action.
Just checking uses: EnricoMi/publish-unit-test-result-action@v1
definitely should fix this? I am using this:
with:
files: /github/workspace/pytest.xml
And still getting this:
Traceback (most recent call last):
File "/action/publish_unit_test_results.py", line 199, in <module>
main(settings)
File "/action/publish_unit_test_results.py", line 51, in main
files = [str(file) for file in pathlib.Path().glob(settings.files_glob)]
File "/action/publish_unit_test_results.py", line 51, in <listcomp>
files = [str(file) for file in pathlib.Path().glob(settings.files_glob)]
File "/usr/local/lib/python3.6/pathlib.py", line 1098, in glob
raise NotImplementedError("Non-relative patterns are unsupported")
NotImplementedError: Non-relative patterns are unsupported
My use case is the previous build step runs tests inside a Docker container, which stores the xunit result file in the mapped /github/workspace
volume. I need to publish it from there.
from publish-unit-test-result-action.
Thanks for the update.
from publish-unit-test-result-action.
The bug has been resolved in #126 and released again.
from publish-unit-test-result-action.
Hey @EnricoMi is absolute file path supported? I have the following config with my test results stored in /tmp/e2e-artifacts/results.xml
- name: run e2e test
env:
LOGIN_SECRET: ${{secrets.LOGIN_SECRET}}
run: |
docker run -t \
-e LOGIN_SECRET \
-e CI=true \
-v /tmp/e2e-artifacts/:/app/playwright-report/ \
-v /tmp/e2e-artifacts/:/app/test-results/ \
${{ env.TEST_TAG }}
- name: upload e2e artifact
uses: actions/upload-artifact@v2
if: ${{ always() }}
with:
name: e2e-artifact
path: /tmp/e2e-artifacts/
retention-days: 5
- name: check contents of /tmp
run: ls /tmp/e2e-artifacts/
- name: Publish Unit Test Results
uses: EnricoMi/publish-unit-test-result-action@v1
if: always()
with:
files: |
/tmp/e2e-artifacts/results.xml
According the the ls /tmp/e2e-artifacts/
I see the artifact file does exists
data
index.html
results.xml
src-pages-me-booking-links-__tests__-create-booking-link-Create-booking-link-Create-simple-booking-link--chromium
src-pages-me-calendars-__tests__-calendar-Calendar-operations-create-calendar-update-delete-calendar-chromium
However I see the following when the Publish Unit Test Results
runs
Warning: Could not find any files for /tmp/e2e-artifacts/results.xml
I was wondering if absolute paths are supported.
Thank you for your wonderful GH action.
from publish-unit-test-result-action.
I think the issue is that uses: EnricoMi/publish-unit-test-result-action@v1
runs the action in a docker container which mounts the current working directory but nothing beyond.
The following should work:
- name: Move artifacts from /tmp into CWD
run: mv -v /tmp/e2e-artifacts ./
- name: Publish Unit Test Results
uses: EnricoMi/publish-unit-test-result-action@v1
if: always()
with:
files: |
./e2e-artifacts/results.xml
from publish-unit-test-result-action.
Related Issues (20)
- Publish test results task is not working due to test result XML not being found HOT 2
- Action fails if comment made by user whose account has been deleted prior to merge HOT 2
- Test Results are not shown in workflow run job list HOT 15
- action_fail_on_inconclusive passed with just a warning annotation HOT 11
- Remove symbols links HOT 2
- Support Maven Surefire Plugin rerunning flaky tests HOT 7
- Add support for TRX StdOut-Element HOT 3
- Option "check_run" not recognized HOT 3
- Unhandled error that crashes GitHub Actions - .NET with coverlet.cobertura HOT 11
- Publishing json file doesn't work if check_run is set to false HOT 2
- bug: action fails to setup due to `--user` in embedded python for windows HOT 5
- androidTest / Could not find any files for test-results/**/*.xml HOT 7
- `-m: command not found` during `Install Python dependencies` HOT 9
- Windows requirements.txt fail HOT 2
- ERROR: Could not open requirements file: [Errno 2] No such file or directory: '.GITHUB_ACTION_PATH\\..\\python\\requirements.txt' HOT 4
- Add support for python 3.12 HOT 4
- 2.16.0 syntax error HOT 4
- Support per file `test_file_prefix` HOT 1
- Spectral junit report has wrong paths to OpenAPI spec file HOT 3
- Annotations are reported at line 0 and therefore are not display correctly. HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from publish-unit-test-result-action.