grass
grass copied to clipboard
Use Codecov uploader in Travis CI instead of deprecated and broken bash uploader
Use Codecov uploader in Travis CI instead of deprecated and broken bash uploader Codecov bash uploader is deprecated and fully sunset since February 2022
See the top in: https://github.com/codecov/codecov-bash/blob/1817ab23d6b35ff6596e48d15db366b71f17ada3/readme.md They also link to their blog: https://about.codecov.io/blog/introducing-codecovs-new-uploader/
When we look at the Travis CI build logs, we see that this step is broken, since there is an error in the syntax. (See full details at the end of the PR)

My first guess at fixing the original syntax error would have been to remove the space between < and ( (see Process Substitution), since I assume the example followed was like this, but without the -Z:
https://github.com/codecov/example-bash/blob/16036e813e65e633cbcc2814ad28eda0c728e57e/.github/workflows/ci.yml
- name: Upload reports to Codecov
run: bash <(curl -s https://codecov.io/bash) -Z
Excerpt of a recent Travis CI run and full log
$ bash < (curl -s https://codecov.io/bash)
/home/travis/.travis/functions: eval: line 109: syntax error near unexpected token `('
/home/travis/.travis/functions: eval: line 109: `bash < (curl -s https://codecov.io/bash) '
Done. Your build exited with 0.
The run is https://app.travis-ci.com/github/OSGeo/grass/jobs/592397008 The full log is here: log.txt
Next question is: What does Codecov upload and check?
At least we know now that there isn't any code coverage info to upload...

Was there a tool run before?
At least we know now that there isn't any code coverage info to upload...
As far as I know the code coverage info has not been generated so far.
Close/reopen to wake up CI
Is this something we would want ready to fix?
Is this something we would want ready to fix?
It would be good to have in general. I don't know if it needs to start with Codecov or something else. I also don't know what it would take at this point to integrate Codecov.
Determining the coverage might be tricky across two languages and command line tools, but maybe the tooling can handle that at this point. In grass.gunittest, I tried to do it on tool-level by collecting which tools are running (that seemed important for GRASS GIS and not covered by other frameworks). The grass.gunittest work is kind of pre-everything with a lot of custom approaches. Anyway, it generates images like this one:
Fixed in #3002