From abfd2d5e37cdc8938862122825eba4824d62e6f4 Mon Sep 17 00:00:00 2001 From: Agustin Borgna Date: Tue, 19 Mar 2024 10:40:06 +0000 Subject: [PATCH] Add codecov flags to split coverage of subprojects --- .github/workflows/ci-py.yml | 1 + .github/workflows/ci-rs.yml | 4 ++-- codecov.yml | 25 +++++++++++++++++++++++++ 3 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 codecov.yml diff --git a/.github/workflows/ci-py.yml b/.github/workflows/ci-py.yml index 434ae876b..1f8f4baeb 100644 --- a/.github/workflows/ci-py.yml +++ b/.github/workflows/ci-py.yml @@ -101,4 +101,5 @@ jobs: with: files: coverage.xml name: python + flags: python token: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/ci-rs.yml b/.github/workflows/ci-rs.yml index c84b89bbd..1048a795c 100644 --- a/.github/workflows/ci-rs.yml +++ b/.github/workflows/ci-rs.yml @@ -138,5 +138,5 @@ jobs: with: files: coverage.json name: rust - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + flags: rust + token: ${{ secrets.CODECOV_TOKEN }} diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 000000000..aec1d6163 --- /dev/null +++ b/codecov.yml @@ -0,0 +1,25 @@ +# Codecov coverage report configuration + +# Coverage report +# Do not fail if the coverage is not met +coverage: + status: + patch: + default: + informational: false + only_pulls: true + project: + default: + informational: true + +# Ignore tests and binaries +ignore: + - "quantinuum-hugr-py/tests" + +# Coverage groups config +flag_management: + default_rules: # the rules that will be followed for any flag added, generally + # Use previous coverage if one is not available for the current commit. + # + # (E.g. if the PR doesn't modify a subproject, we don't submit a coverage report for it.) + carryforward: true