ward icon indicating copy to clipboard operation
ward copied to clipboard

[CI] Switch to Codecov GitHub action instead of bash uploader

Open darrenburns opened this issue 3 years ago • 5 comments

Codecov have their own GitHub action. We should migrate to that.

darrenburns avatar May 30 '21 22:05 darrenburns

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)

JoshKarpel avatar May 31 '21 01:05 JoshKarpel

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.

darrenburns avatar Jun 05 '21 10:06 darrenburns

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

AABur avatar Oct 15 '21 18:10 AABur

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.

blueyed avatar Oct 16 '21 20:10 blueyed

@darrenburns, this issue has already been implemented a long time ago. However, it looks like it's time to close it.

AABur avatar Apr 11 '22 21:04 AABur