What's the point of using `directory` if the complete path to the report has to be provided in `files`?

Please check the troubleshooting guide before creating a ticket.
All fields below are required.

Description

As per the documentation, directory is the directory to search for coverage reports, and files is the comma-separated paths to the coverage report(s).

If directory is ./tests/coverage/ , and file is coverage.xml, I’m seeing a message - file not found at coverage.xml.

Changing the value of file to ./tests/coverage/coverage.xml works.

But the first case should also work since I’m specifying the directory which contains the report and the name of the report.

Commit SHAs

8ebdb7c6d93b002deb327230def2087705fb8e02

Repository

CI/CD or Build URL

Section : “Publish Coverage Report”

Uploader

GitHub Actions

Codecov Output

Expected Results

The expected behavior should be navigating to the path specified by directory and then looking for the file(s) speified by files.
So the following should work:

files: coverage.xml
directory: ./tests/coverage/

Actual Results

Generated XML file needs full path - files: ./tests/coverage/coverage.xml.

Additional Information

As per the documentation, directory is the directory to search for coverage reports, and files is the comma-separated paths to the coverage report(s).

@saurabmish, it’s a bit of a nuance here. Using files without wildcards assumes that the user knows exactly the file they want to handle. So it bypasses our typical file search.

Just specifying directory would only look in that directory. For your case, you can just do

files: coverage.xml

but you could also do

directory: ./tests/coverage/

or even

files: *.xml
directory: ./tests/coverage/