Action does not find reports by glob pattern

Description

Hi! I have a problem with the github action. In my project I generate a lot of OpenCover.xml files. These files should be published to codecov. I found out that the action is using the bash script which is supporting a glob pattern `folder/*.OpenCover.xml*. If the action runs it only finds 1 report.

Repository

CI/CD

https://github.com/PHOENIXCONTACT/MORYX-Platform/runs/1197445288

Uploader

codecov-action

Codecov YAML

- name: Codecov
  uses: codecov/codecov-action@v1
  with:
  files: './artifacts/Tests/*.OpenCover.xml'

Codecov Output

==> GitHub Actions detected.
    project root: D:/a/MORYX-Platform/MORYX-Platform
    Yaml not found, that's ok! Learn more at http://docs.codecov.io/docs/codecov-yaml
    -> Found 1 reports
==> Detecting git/mercurial file structure
==> Reading reports
    + ./artifacts/Tests/Moryx.Communication.Sockets.IntegrationTests.OpenCover.xml 

Additional Information

There are currently 7 report XML files in this folder, but why are they not found? I already checked the code which is reading the files but do not have found any problems.

@dbeuchler, would you be able to run this with the bash uploader in verbose mode? I’d like to see what might be going on here

- name: Codecov
  run: bash <(curl -s https://codecov.io/bash) -v -f './artifacts/Tests/*.OpenCover.xml'

Sure!
Here you can see all generated reports in line 70.

… and here is the bash output

With the bash script, no report was found.

@dbeuchler, just *.OpenCover.xml should work. See this run

Thank you very much for your help, that works! I didn’t notice that all files and folders are scanned with the glob pattern.

For me the solution works but is it not a mistake that the glob pattern with path is not working?

Hi @dbeuchler, it’s probably because we use -name as the argument in the find command here which is set here. If we switch to using -path, it would most likely fix this issue. Based on the docs for -name in find

True if the last component of the pathname being examined matches pattern…

This makes sense why it wasn’t showing up for you before.