grass icon indicating copy to clipboard operation
grass copied to clipboard

Use Codecov uploader in Travis CI instead of deprecated and broken bash uploader

Open echoix opened this issue 2 years ago • 5 comments

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)

image

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?

echoix avatar Jan 04 '23 20:01 echoix

At least we know now that there isn't any code coverage info to upload... image

Was there a tool run before?

echoix avatar Jan 04 '23 20:01 echoix

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.

neteler avatar Jan 07 '23 17:01 neteler

Close/reopen to wake up CI

neteler avatar Feb 27 '23 12:02 neteler

Is this something we would want ready to fix?

echoix avatar Apr 13 '23 23:04 echoix

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:

image

wenzeslaus avatar Dec 16 '23 02:12 wenzeslaus

Fixed in #3002

echoix avatar Jun 19 '24 11:06 echoix