From 11b1a4772dc0017a630907905c96d6bd2443bc4e Mon Sep 17 00:00:00 2001 From: Thibault Charbonnier Date: Mon, 11 Sep 2023 08:22:26 -0700 Subject: [PATCH] chore(ci) restore Codecov support alongside Coveralls Codecov has a couple features that Coveralls lacks: better PR comments and PR diff comments of uncovered lines. It's also easier to maintain compared to the `carryforward` flags of Coveralls. --- .github/workflows/job-unit-tests.yml | 5 +++++ codecov.yml | 28 ++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 codecov.yml diff --git a/.github/workflows/job-unit-tests.yml b/.github/workflows/job-unit-tests.yml index b77f41d6b..c056c5524 100644 --- a/.github/workflows/job-unit-tests.yml +++ b/.github/workflows/job-unit-tests.yml @@ -146,6 +146,11 @@ jobs: flag-name: ${{ steps.lcov.outputs.name }} path-to-lcov: './lcov.info' parallel: true + - name: Codecov Upload + if: ${{ !env.ACT && inputs.cc == 'gcc-9' && inputs.coverage }} + uses: codecov/codecov-action@v3 + with: + files: './lcov.info' - uses: actions/upload-artifact@v2 if: ${{ failure() && !env.ACT }} with: diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 000000000..07eb8f3e9 --- /dev/null +++ b/codecov.yml @@ -0,0 +1,28 @@ +# https://docs.codecov.io/docs/codecovyml-reference +codecov: + require_ci_to_pass: yes + notify: + wait_for_ci: yes + after_n_builds: 9 + +coverage: + precision: 4 + round: down + range: "75...100" + status: + project: + default: + target: auto + threshold: 3% + base: auto + flags: + - unit + paths: + - src + +comment: + layout: "reach, diff, files" + behavior: default + require_changes: false + require_base: no + require_head: yes