codecov-action icon indicating copy to clipboard operation
codecov-action copied to clipboard

Windows fails to upload coverage if multiple files are specified

Open hameerabbasi opened this issue 11 months ago • 7 comments

See log lines here.

hameerabbasi avatar Dec 19 '24 11:12 hameerabbasi

@hameerabbasi I'm off until the new year, I'll look at this when I get back. I think this may be a problem with the way we do globbing

thomasrockhu-codecov avatar Dec 25 '24 01:12 thomasrockhu-codecov

Copying the log lines here as GH actions logs aren't permanent:

==> Running upload-coverage
      ./codecov.exe  upload-coverage -t <redacted> --git-service github --file ./**/coverage*.xml --gcov-executable gcov
info - 2024-12-19 06:59:58,262 -- ci service found: github-actions
Usage: codecov.exe upload-coverage [OPTIONS]
Try 'codecov.exe upload-coverage -h' for help.

Error: Got unexpected extra arguments (.\coverage_MLIR.xml .\coverage_Numba.xml)

hameerabbasi avatar Jan 27 '25 06:01 hameerabbasi

@hameerabbasi I'm almost positive this is a glob issue right now. I have an issue slated next month to work on adding proper glob support to the underlying CLI, but I'm afraid for now, the workaround is to do something like

- name: Upload coverage to Codecov
  uses: codecov/codecov-action@v5
  with:
    token: ${{ secrets.CODECOV_TOKEN }}
    files: coverage_MLIR.xml,coverage_Numba.xml

thomasrockhu-codecov avatar Jan 30 '25 20:01 thomasrockhu-codecov

@hameerabbasi just a stupid question, what happens if you run it as

files: "./**/coverage*.xml"

thomasrockhu-codecov avatar Feb 12 '25 22:02 thomasrockhu-codecov

I can try -- but the yaml will parse to the same thing, it won't even contain the quotes.

hameerabbasi avatar Feb 13 '25 04:02 hameerabbasi

@hameerabbasi ok, do you mind trying again on the latest? (with and without quotes)

thomasrockhu-codecov avatar Feb 19 '25 18:02 thomasrockhu-codecov

@thomasrockhu-codecov The following diff seemed to do the trick: https://github.com/pydata/sparse/pull/764/commits/148d1aabbc0438fccd8cad6bafce1cf5af4ac18d

However, as one can see, one has to escape the quotes inside the YAML, which could end up being counter-intuitive. Would there be a possibility of adding quotes in the action itself, so that escaped YAML quotes don't need to be provided?

hameerabbasi avatar Feb 20 '25 10:02 hameerabbasi