From b0fbf2c4ccab3e5d39c3b9ce1417b6a6c8f57c95 Mon Sep 17 00:00:00 2001 From: Amir Zarrinkafsh Date: Mon, 30 Nov 2020 21:12:46 +1100 Subject: [PATCH] [CI] Exclude non-coverage files from codecov upload (#1495) * [CI] Exclude non-coverage files from codecov upload * Ignore React serviceWorker.ts for coverage As we do not utilise service workers in React gives more accurate coverage percentages when ignored. --- .buildkite/hooks/post-command | 5 ++++- .codecov.yml | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.buildkite/hooks/post-command b/.buildkite/hooks/post-command index 920507ee1..d3c0f1a8c 100755 --- a/.buildkite/hooks/post-command +++ b/.buildkite/hooks/post-command @@ -16,7 +16,10 @@ if [[ ! $BUILDKITE_BRANCH =~ ^(v.*) ]] && [[ $BUILDKITE_COMMAND_EXIT_STATUS == 0 BUILDKITE_AGENT_META_DATA_CODECOV="-v" fi bash <(curl -s --connect-timeout 10 --retry 10 --retry-max-time 0 https://codecov.io/bash) -Z -c -f "coverage.txt" -F backend ${BUILDKITE_AGENT_META_DATA_CODECOV} - bash <(curl -s --connect-timeout 10 --retry 10 --retry-max-time 0 https://codecov.io/bash) -Z -c -F frontend ${BUILDKITE_AGENT_META_DATA_CODECOV} + if [[ $BUILDKITE_LABEL =~ ":selenium:" ]]; then + cd web && yarn report + fi + bash <(curl -s --connect-timeout 10 --retry 10 --retry-max-time 0 https://codecov.io/bash) -Z -c -f '!*.go' -f '!*.zst' -F frontend ${BUILDKITE_AGENT_META_DATA_CODECOV} fi fi diff --git a/.codecov.yml b/.codecov.yml index 2f371268f..a2712598e 100644 --- a/.codecov.yml +++ b/.codecov.yml @@ -32,6 +32,9 @@ flags: paths: - "web/" +ignore: + - "web/src/serviceWorker.ts" + parsers: gcov: branch_detection: