Upload not reading token from `.codecov.yml` nor `codecov.yml`
When I tried running $ codecov in the root directory of the repository, I'm getting the following output:
_____ _
/ ____| | |
| | ___ __| | ___ ___ _____ __
| | / _ \ / _` |/ _ \/ __/ _ \ \ / /
| |___| (_) | (_| | __/ (_| (_) \ V /
\_____\___/ \__,_|\___|\___\___/ \_/
v2.2.0
YAML .codecov.yml
==> Detecting CI Provider
No CI Detected. Using git/mercurial
==> Configuration:
Endpoint: https://codecov.io
{ commit: 'eb22cc3fcb7c17222366ed11b57ea5a1049fd7c2',
branch: 'master',
package: 'node-v2.2.0' }
==> Building file structure
==> Generating gcov reports (skip via --disable=gcov)
$ find . -type f -name '*.gcno' -exec gcov {} +
==> Scanning for reports
+ ./foo/coverage/lcov.info
==> Uploading reports
HTTP 400
Please provide the repository token to upload reports via `-t :repository-token`
even though there's a token in my .codecov.yml. I did verify that the .codecov.yml is valid by running:
$ cat .codecov.yml | curl --data-binary @- https://codecov.io/validate
Upon digging into the code, I see these lines detect the codecov.yml file but don't do anything with it.
I can put the token in process.env.CODECOV_TOKEN but I'm just wondering if it's a mistake or by design that reading the token from the codecov.yml file isn't supported.
👍 - same issue for me, forcing us to continue using token flag to run cmd
this is for private repo if it makes a difference.
If the yaml is not detected at .codecov.yml you may need to change the path to codecov.yml. Our detection occurs through the git ls-files in our backend.
If you would like us to manually change the location of the yaml please contact us in the in-app chat support with owner/repo @ .codecov.yml to adjust it.
Thank you, Steve
Please do put the token in process.env.CODECOV_TOKEN 👍
I must put my upload token in the git repo?
@jacobbogers no it doesn't need to go in the git repo. It can just be in your CI.
i submitted a PR for supporting either one of the yaml files: https://github.com/codecov/codecov-node/pull/108