CodeCoverageSummary: Error: No files found matching glob pattern.

I am attempting to use CodeCoverageSummary in a very similar way as in https://github.com/irongut/CodeCoverageSummary/blob/master/README.md (the .NET one except I am using Go). I am getting “no files found” even though the file is there. The symptom seems to be the same as what’s reported @ https://stackoverflow.com/questions/73543621/coverage-xml-output-file-is-not-seen-in-github-actions-uses, is this an environment specific issue? Or is the example in the README not working as-is?

Run irongut/CodeCoverageSummary@v1.3.0
  with:
    filename: coverage.xml
    badge: false
    fail_below_min: false
    format: markdown
    hide_branch_rate: false
    hide_complexity: true
    indicators: true
    output: both
    thresholds: 60 80
<snip>

Error: No files found matching glob pattern.

About this issue

  • Original URL
  • State: open
  • Created 3 years ago
  • Reactions: 10
  • Comments: 17

Commits related to this issue

Most upvoted comments

When I use an absolute path —— filename: ${{ github.workspace }}/coverage/coverage.cobertura.xml, it outputs: Error: No files found matching glob pattern.

When I use relative path —— filename: coverage/coverage.cobertura.xml, it works.

I was just about to comment the same… It looks like because this is a docker-based container, the work dir might be mounted under a slightly different path so it’s imperative to pass relative paths for this to work. It could be documented better, though.

This issue started for me today as well when trying to update coverlet.collector from 6.0.0 to 6.0.1

Run irongut/CodeCoverageSummary@v1.[3] with: filename: coverage/*/coverage.cobertura.xml badge: true format: markdown output: both fail_below_min: false hide_branch_rate: false hide_complexity: false indicators: true thresholds: 50 75

Error: No files found matching glob pattern.

Please reopen it.

@webknjaz, see the solution on this thread (worked for me): https://github.com/SeanKilleen/ExampleTestResultsWithGithubActions/issues/9

Hope it helps 🙏🏼

I amend the statement I made earlier.

When I use a glob path —— filename: ${{ github.workspace }}/coverage/**/coverage.cobertura.xml or filename: coverage/**/coverage.cobertura.xml or filename: coverage/*/coverage.cobertura.xml, it outputs: Error: No files found matching glob pattern.

When I use an absolute path —— filename: ${{ github.workspace }}/coverage/coverage.cobertura.xml, it outputs: Error: No files found matching glob pattern.

When I use relative path —— filename: coverage/coverage.cobertura.xml, it works.

About the coverage/coverage.cobertura.xml file path: The coverage/coverage.cobertura.xml file path is located in the ${{ github.workspace }}/coverage folder path.

After executing the dotnet test --nologo --no-restore --configuration Release --runtime linux-x64 --collect:"XPlat Code Coverage" --results-directory "${{ github.workspace }}/coverage" command, the coverage.cobertura.xml file is generated under the ${{ github.workspace }}/coverage/648b9892-da05-42c2-90dc-a9f1d23077dd/ folder path.

I execute the cp ${{ github.workspace }}/coverage/**/coverage.cobertura.xml ${{ github.workspace }}/coverage/coverage.cobertura.xml command, copy it to the ${{ github.workspace }}/coverage folder path.

So coverage.cobertura.xml file exists in both ${{ github.workspace }}/coverage/648b9892-da05-42c2-90dc-a9f1d23077dd/ and ${{ github.workspace }}/coverage paths.