build: make codecov reports consistent/not confusing (#6734)

* build: codecov config

* build: better codecov

* build: omit default

* build: sensical codecov

* build: upload-artifact

* build: customize codecov comment

* build: try again

* build: try again

* build: turn off status except flags

* build: flag comments

* build: changes on

* build: simplify

* build: after_n for comment
This commit is contained in:
Zach Pomerantz 2023-06-09 11:00:27 -07:00 committed by GitHub
parent cb362f1b2c
commit 4235b57cd8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 27 additions and 3 deletions

@ -78,7 +78,6 @@ jobs:
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: false
verbose: true
flags: unit-tests
- if: failure() && github.ref_name == 'main'
uses: ./.github/actions/report
@ -100,7 +99,7 @@ jobs:
- run: yarn build:e2e
env:
NODE_OPTIONS: "--max_old_space_size=4096"
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: build-e2e
path: build
@ -166,7 +165,11 @@ jobs:
COMMIT_INFO_TIMESTAMP: ${{ github.event.pull_request.updated_at || github.event.head_commit.timestamp }}
CYPRESS_PULL_REQUEST_ID: ${{ github.event.pull_request.number }}
CYPRESS_PULL_REQUEST_URL: ${{ github.event.pull_request.html_url }}
- uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: false
flags: e2e-tests
- if: failure() && github.ref_name == 'main'
uses: ./.github/actions/report
with:

@ -9,17 +9,38 @@ ignore:
- "**/constants/**/*"
- "constants/**/*"
coverage:
status:
# Omit merging unit/e2e reports into the defaults, as it is nonsensical.
project: off
patch: off
flag_management:
default_rules:
statuses:
- type: project
target: auto
threshold: 1%
# Adjust the base when removing code to avoid penalizing tech debt payback / dead code removal.
removed_code_behavior: adjust_base
if_ci_failed: error
- type: patch
target: 80%
individual_flags:
- name: unit-tests
- name: e2e-tests
# Wait until all machines have reported coverage - e2e tests run across 4 machines.
after_n_builds: 4
statuses:
- type: patch
target: 0%
comment:
layout: flags
# Wait until all machines have reported coverage - e2e tests run across 4 machines + unit tests across 1.
after_n_builds: 5
hide_comment_details: false
github_checks:
# Turn off GitHub Check annotations, as they make it more difficult to review code.
annotations: false