Support absolute path in `files` setting
See original GitHub issueI would like to collect test results somewhere in /tmp (so that I don’t modify the checked out source tree that is the current working directory). Unfortunately, this fails with the following error:
Traceback (most recent call last):
File "/action/publish_unit_test_results.py", line 202, in <module>
main(settings)
File "/action/publish_unit_test_results.py", line 52, in main
files = [str(file) for file in pathlib.Path().glob(settings.files_glob)]
File "/action/publish_unit_test_results.py", line 52, 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
Here is my configuration:
- name: Publish Unit Test Results
uses: EnricoMi/publish-unit-test-result-action@v1.12
# run even if tests failed
if: always()
with:
files: /tmp/test-reports/**/*.xml
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
File path formats on Windows systems | Microsoft Learn
As result, the first is an absolute path from the root directory of drive C: , whereas the second is a relative path...
Read more >Java File Path, Absolute Path and Canonical Path | DigitalOcean
On UNIX systems, a relative pathname is made absolute by resolving it against the current user directory.
Read more >How to set an absolute path in TypeScript | Towards the Cloud
Absolute file paths can help organize the imports in your TypeScript projects by improving the way import locations are fetched by the ...
Read more >Relative and absolute paths, in the file system and on the web ...
If the path is built starting from the system root, it is called absolute. · If the path is built starting from the...
Read more >Classic SysAdmin: Absolute Path vs Relative Path in Linux/Unix
An absolute path is defined as the specifying the location of a file or directory from the root directory(/). In other words we...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Sorry, I had to revert that feature as it introduced some regression: #124
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: