codecov-node icon indicating copy to clipboard operation
codecov-node copied to clipboard

Uploads from Github Actions are Untitled

Open StephanBijzitter opened this issue 5 years ago • 1 comments

Searched for this issue, found this as the first result on Google: https://github.com/data61/anonlink/issues/224

image

Github Actions is listed as supported, so it was quite confusing to see "Untitled" builds in my uploads. The documentation also didn't help very much, but with the issue I linked above, I found out I was not the only one :-)

Would it be an idea to add command-line arguments to set the title, build url and whatever other info can be displayed? With that, any new CI that is not yet fully supported can rely on those until support is added.

StephanBijzitter avatar May 06 '20 22:05 StephanBijzitter

Github Action is not currently detected by codevov package as CI automatically, moreover the way branches are checked out by Github Actions the upload will always indicate that it come from the master branch. To fix these currently you can run the following script to upload:

codecov -f ./coverage/clover.xml -t ${{ secrets.CODECOV_TOKEN }} --commit=$GITHUB_SHA --branch=${GITHUB_REF##*/}  --build "Github Actions"

Notes:

  • you may not need to use the -f flag if your coverage file automatically detected
  • I have never used the --build flag, in production you probably want to add some unique so attaching the build number (GITHUB_RUN_NUMBER) to it is not a bad idea

NoNameProvided avatar Aug 04 '20 05:08 NoNameProvided