-
-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add coverage upload to Codecov (#781)
- Loading branch information
Showing
3 changed files
with
34 additions
and
0 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 |
---|---|---|
|
@@ -66,6 +66,15 @@ jobs: | |
run: yarn install --frozen-lockfile | ||
- name: Run Unit Tests | ||
run: yarn test | ||
- name: Push code coverage to codecov | ||
uses: codecov/codecov-action@13ce06bfc6bbe3ecf90edbbf1bc32fe5978ca1d3 # [email protected] | ||
with: | ||
# Need to specify the token here, as the codecov action requires it for protected branches. | ||
# If not set, this error is shown: `Token required because branch is protected` | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
# Do not fail the build if codecov fails to report the coverage. | ||
fail_ci_if_error: false | ||
flags: unit-tests | ||
|
||
job_e2e_test: | ||
name: ${{ matrix.wizard }} E2E Tests | ||
|
@@ -101,3 +110,12 @@ jobs: | |
run: yarn install --frozen-lockfile | ||
- name: Run End-to-End Tests | ||
run: yarn test:e2e ${{ matrix.wizard }} | ||
- name: Push code coverage to codecov | ||
uses: codecov/codecov-action@13ce06bfc6bbe3ecf90edbbf1bc32fe5978ca1d3 # [email protected] | ||
with: | ||
# Need to specify the token here, as the codecov action requires it for protected branches. | ||
# If not set, this error is shown: `Token required because branch is protected` | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
# Do not fail the build if codecov fails to report the coverage. | ||
fail_ci_if_error: false | ||
flags: e2e-tests |
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Reference: https://docs.codecov.com/docs/codecovyml-reference | ||
|
||
codecov: | ||
# Codecov should wait for all other statuses to pass before sending its status. | ||
require_ci_to_pass: true | ||
notify: | ||
# Codecov will wait for all CI statuses to complete before sending its status. | ||
# Note: Codecov considers all non-codecov statuses to be CI statuses. | ||
wait_for_ci: true | ||
|
||
coverage: | ||
# The coverage percentage that should be reached before the build is considered successful. | ||
# Note: This is set to a low value, as the test coverage is not high yet. | ||
# When adding more test coverage, consider increasing this value. | ||
range: 40...100 |
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