[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.
pull/1496/head
Amir Zarrinkafsh 2020-11-30 21:12:46 +11:00 committed by GitHub
parent d890e7d751
commit b0fbf2c4cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View File

@ -16,7 +16,10 @@ if [[ ! $BUILDKITE_BRANCH =~ ^(v.*) ]] && [[ $BUILDKITE_COMMAND_EXIT_STATUS == 0
BUILDKITE_AGENT_META_DATA_CODECOV="-v" BUILDKITE_AGENT_META_DATA_CODECOV="-v"
fi 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 "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
fi fi

View File

@ -32,6 +32,9 @@ flags:
paths: paths:
- "web/" - "web/"
ignore:
- "web/src/serviceWorker.ts"
parsers: parsers:
gcov: gcov:
branch_detection: branch_detection: