-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build(ci): Use codecov GH action instead of bash script (#32959)
This uses a GH Action instead of bash script. The bash script has been deprecated. See https://github.com/codecov/codecov-action * Change our uploads by adding a flag for frontend or backend. * Only upload coverage of acceptance tests on backend changes (unsure how this will affect codecov for frontend only changes) This does *NOT* fix the spiky reporting of coverage (which I believe is due to flakey tests, eg, 3 of 4 test instances fail, but we still report 3 of them to codecov. Note, due to a [bug in codecov](codecov/uploader#475), we have to unset `NODE_OPTIONS`
- Loading branch information
Showing
3 changed files
with
32 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,26 @@ | ||
name: 'Sentry Artifacts' | ||
description: 'Handles uploading coverage/test artifacts to codecov' | ||
|
||
inputs: | ||
files: | ||
description: "Path to coverage file(s) - comma separated for multiple files" | ||
default: ".artifacts/*.coverage.xml" | ||
required: true | ||
type: | ||
description: "The type of change (frontend, backend)" | ||
default: "backend" | ||
required: false | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Upload to codecov | ||
shell: bash | ||
run: | | ||
coverage_files=$(ls .artifacts/*coverage.xml || true) | ||
if [[ -n "$coverage_files" || -f .artifacts/coverage/cobertura-coverage.xml ]]; then | ||
bash <(curl -s https://codecov.io/bash) -v | ||
fi | ||
uses: codecov/codecov-action@v2 | ||
env: | ||
# This is because of a bug in codecov's uploader | ||
# See: https://github.com/codecov/uploader/issues/475 | ||
NODE_OPTIONS: "" | ||
with: | ||
flags: ${{ inputs.type }} | ||
files: ${{ inputs.files }} | ||
verbose: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters