GitLab CI artifacts:reports:junit Path Not Found - No Test Report
artifacts:reports:junit uploads JUnit XML so the MR shows a test report. If the path glob matches nothing, GitLab warns that no matching files were found and the MR has no test widget.
What this error means
The job log warns that the junit report path matched no files, and the merge request shows no test summary even though tests ran.
WARNING: junit.xml: no matching files. Ensure that the artifact path
is relative to the working directory.
Uploading artifacts as "junit" to coordinator... no files to uploadCommon causes
Runner produced no XML
The test command did not emit a JUnit file, so the glob matches nothing.
Wrong path or working directory
The report was written to a subdirectory, but the artifacts path is relative to the job working directory.
Glob does not match the filename
A pattern like **/junit.xml will miss report.xml or a differently named file.
How to fix it
Point the report at the real XML path
Configure the test runner to emit JUnit XML and reference the exact path.
test:
script:
- pytest --junitxml=report.xml
artifacts:
when: always
reports:
junit: report.xmlUse a glob and upload on failure too
- Set artifacts:when to always so reports upload even when tests fail.
- Use a glob such as **/junit-*.xml if multiple files are produced.
- List the working directory in the job to confirm where the XML lands.
How to prevent it
- Always set artifacts:when: always for test reports.
- Confirm the runner JUnit output path matches the artifacts path.
- Verify the MR test widget appears after the first run.