ward
ward copied to clipboard
[CI] Switch to Codecov GitHub action instead of bash uploader
Codecov have their own GitHub action. We should migrate to that.
I'm not sure there's an easy way around this... AFAIK, the workflows run independently, and they merges the reports on their side. This seems to be their expected workflow, and it lets them do things like mark code which is only covered in certain environments. There might be a fancy way to make the files be artifacts and move them between workflow runs and merge them ourselves, but I don't think they expect you to do that.
(But yes, their Action is convenient - here's the config I've used https://github.com/JoshKarpel/spiel/blob/352ebf867bafd24982c553511a52ee1ede5b2521/.github/workflows/quality-check.yml#L49)
Huh, interesting. Thanks for the info. I'll re-purpose this issue to be around changing to use the Codecov Action. I think the thing that seemed particularly weird was the comment that Codecov was leaving on PRs was being edited 15 times in the space of a minute on every commit.
there is a very simple solution
instead of
- name: Upload coverage report to codecov
run: |
bash <(curl -s https://codecov.io/bash) -f coverage.xml
shell: bash
use
- name: "Upload coverage to Codecov"
uses: codecov/codecov-action@v2
with:
fail_ci_if_error: true
You can see the result in my fork https://github.com/AABur/ward Note the second codecov budge - it shows the result from my fork
I think the thing that seemed particularly weird was the comment that Codecov was leaving on PRs was being edited 15 times in the space of a minute on every commit.
You can configure it to wait for all jobs to finish before reporting (after_n_builds
), and in particular can also disable comments, but only keep the statuses (patch and project). See https://docs.codecov.com/docs/codecovyml-reference.
@darrenburns, this issue has already been implemented a long time ago. However, it looks like it's time to close it.