Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Globs not supported in v2? #770

Closed
dyladan opened this issue Jun 24, 2022 · 5 comments
Closed

Globs not supported in v2? #770

dyladan opened this issue Jun 24, 2022 · 5 comments

Comments

@dyladan
Copy link

dyladan commented Jun 24, 2022

A lerna monorepo consists of many packages in a single git repository. They are typically each in a folder in the packages/ directory. After my tests run, coverage reports are generated in the ./coverage folder of each subproject.

packages/package-1/coverage
packages/package-2/coverage
...

I am attempting to upload coverage for lerna monorepo using the following configuration:

      - name: Report Coverage
        uses: codecov/codecov-action@v2
        with:
          file: ./packages/*/coverage/*.json

But no coverage files are found. Full log output:

Run codecov/codecov-action@v2
==> linux OS detected
https://uploader.codecov.io/latest/linux/codecov.SHA25[6](https://github.com/open-telemetry/opentelemetry-js/runs/7030918438?check_suite_focus=true#step:9:7)SUM
==> SHASUM file signed by key id 806bb28aed[7](https://github.com/open-telemetry/opentelemetry-js/runs/7030918438?check_suite_focus=true#step:9:8)79[8](https://github.com/open-telemetry/opentelemetry-js/runs/7030918438?check_suite_focus=true#step:9:9)6[9](https://github.com/open-telemetry/opentelemetry-js/runs/7030918438?check_suite_focus=true#step:9:10)
==> Uploader SHASUM verified (432553f03714a83ab5cac78be2e7fe6a6050767f78f77e9c7a84bdb1c34a0bd3  codecov)
==> Running version latest
==> Running version v0.2.4
/home/runner/work/_actions/codecov/codecov-action/v2/dist/codecov -n  -Q github-action-2.1.0 -f ./packages/*/coverage/*.json -C 413ad93886a715283ebd[11](https://github.com/open-telemetry/opentelemetry-js/runs/7030918438?check_suite_focus=true#step:9:12)11ce83e4c22b17d4d9
[2022-06-23T20:04:53.433Z] ['info'] 
     _____          _
    / ____|        | |
   | |     ___   __| | ___  ___ _____   __
   | |    / _ \ / _` |/ _ \/ __/ _ \ \ / /
   | |___| (_) | (_| |  __/ (_| (_) \ V /
    \_____\___/ \__,_|\___|\___\___/ \_/
  Codecov report uploader 0.2.4
[[20](https://github.com/open-telemetry/opentelemetry-js/runs/7030918438?check_suite_focus=true#step:9:21)[22](https://github.com/open-telemetry/opentelemetry-js/runs/7030918438?check_suite_focus=true#step:9:23)-06-[23](https://github.com/open-telemetry/opentelemetry-js/runs/7030918438?check_suite_focus=true#step:9:24)T20:04:53.440Z] ['info'] => Project root located at: /home/runner/work/opentelemetry-js/opentelemetry-js
[2022-06-23T20:04:53.443Z] ['info'] -> No token specified or token is empty
[2022-06-23T20:04:53.451Z] ['info'] Searching for coverage files...
[2022-06-23T20:04:53.582Z] ['error'] None of the following appear to exist as files: ./packages/*/coverage/*.json
[2022-06-23T20:04:53.583Z] ['error'] There was an error running the uploader: Error while cleaning paths. No paths matched existing files!
@ssbarnea
Copy link

The current version is v3 and they did not bother to reply or to mention in docs if glob patterns are allowed.

@lefou
Copy link

lefou commented Nov 30, 2022

From personal experiments, globs aren't supported in v3.

@ssbarnea
Copy link

ssbarnea commented Dec 1, 2022

@thomasrockhu Any chance to get a pair of eyes on this one. Forcing people to use only hard-coded file paths instead of being able to use glob patterns for the files to be collected is a huge regression.

@thomasrockhu-codecov
Copy link
Contributor

@dyladan @ssbarnea ok, I made some changes here to how we handle globs. I would recommend trying ** for dirs as opposed to *, but I have to be honest, I'm not sure if it'll work.

I'm going to push towards our community boards because I check that more frequently. If the above doesn't work, please ping me there and I'll do what I can to fix it.

@lefou
Copy link

lefou commented Apr 25, 2023

@thomasrockhu-codecov This issue is still present. Your suggested ** glob does not work. Please reopen the issue.


==> linux OS detected
https://uploader.codecov.io/latest/linux/codecov.SHA256SUM
==> SHASUM file signed by key id 806bb28aed779869
==> Uploader SHASUM verified (02b055414cc124203ab061ffc45f5497ca39ede5e63a06717a6981c32d7b425f  codecov)
==> Running version latest
==> Running version v0.5.0
/home/runner/work/_actions/codecov/codecov-action/v3/dist/codecov -n  -Q github-action-3.1.3 -f ./out/**/scoverage/xmlReport.dest/scoverage.xml -C 08e0d7031ca1c86d39fbafcee9e409d5731052a2
[2023-04-25T09:52:06.087Z] ['info'] 
     _____          _
    / ____|        | |
   | |     ___   __| | ___  ___ _____   __
   | |    / _ \ / _` |/ _ \/ __/ _ \ \ / /
   | |___| (_) | (_| |  __/ (_| (_) \ V /
    \_____\___/ \__,_|\___|\___\___/ \_/

  Codecov report uploader 0.5.0
[2023-04-25T09:52:06.096Z] ['info'] => Project root located at: /home/runner/work/mill-kotlin/mill-kotlin
[2023-04-25T09:52:06.098Z] ['info'] -> No token specified or token is empty
[2023-04-25T09:52:06.106Z] ['info'] Searching for coverage files...
[2023-04-25T09:52:06.242Z] ['error'] None of the following appear to exist as files: ./out/**/scoverage/xmlReport.dest/scoverage.xml
[2023-04-25T09:52:06.242Z] ['error'] There was an error running the uploader: Error while cleaning paths. No paths matched existing files!

When the files are specified explicitly, the logs looks like this:

/home/runner/work/_actions/codecov/codecov-action/v3/dist/codecov -n  -Q github-action-3.1.3 -f ./out/api/0.11.0-M8/scoverage/xmlReport.dest/scoverage.xml -f ./out/api/0.10/scoverage/xmlReport.dest/scoverage.xml -f ./out/api/0.9/scoverage/xmlReport.dest/scoverage.xml -f ./out/api/0.7/scoverage/xmlReport.dest/scoverage.xml -f ./out/worker/0.11.0-M8/scoverage/xmlReport.dest/scoverage.xml -f ./out/worker/0.10/scoverage/xmlReport.dest/scoverage.xml -f ./out/worker/0.9/scoverage/xmlReport.dest/scoverage.xml -f ./out/worker/0.7/scoverage/xmlReport.dest/scoverage.xml -f ./out/main/0.11.0-M8/scoverage/xmlReport.dest/scoverage.xml -f ./out/main/0.10/scoverage/xmlReport.dest/scoverage.xml -f ./out/main/0.9/scoverage/xmlReport.dest/scoverage.xml -f ./out/main/0.7/scoverage/xmlReport.dest/scoverage.xml -C 314ee8ad69155e80b7d4acba94553986bb747e5f

I also couldn't find any glob related change in the release notes or merged pull request list. Where did you made your "changes"?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants