Hi,
I’m trying to use the new Codecov uploader to upload coverage run for a Python codebase running within Heroku CI. Since it’s not in GitHub Actions, it fails to retrieve the commit hash. We don’t use self-hosted enterprise so don’t have a slug.
This is the output:
Codecov report uploader 0.1.0
631[2021-09-27T15:23:14.855Z] [‘info’] => Project root located at: /app
632[2021-09-27T15:23:14.856Z] [‘info’] → Token found by arguments
633[2021-09-27T15:23:15.034Z] [‘info’] Searching for coverage files…
634[2021-09-27T15:23:15.298Z] [‘info’] => Found 1 possible coverage files:
635 coverage.xml
636[2021-09-27T15:23:15.298Z] [‘info’] Processing /app/coverage.xml…
637[2021-09-27T15:23:15.316Z] [‘info’] Detected Local as the CI provider.
638[2021-09-27T15:23:15.332Z] [‘error’] There was an error running the uploader:
639Unable to detect service, please specify sha and slug manually.
640You can do this by passing the values with the -S
and -r
flags.
641See the -h
flag for more details.
642-----> test command cd tests && bash run_tests.sh
completed successfully
Here is my run command:
./codecov -R /app -N $HEROKU_TEST_RUN_COMMIT_VERSION -t ${CODECOV_TOKEN} -c -F webserver
I tried with flag -N, -S, -C. The error message says to use -S, but the documentation mentions -C and -N. How do I get it to recognize the commit SHA and ignore the slug? I verified that the Heroku environment variable does contain the commit sha.