Skip to content

chore: add codecov #1203

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 22 commits into from
Oct 31, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: 2
version: 2.1

aliases:
- &filter-only-main
Expand All @@ -15,6 +15,9 @@ defaults: &defaults
- image: cimg/node:current
working_directory: ~/react-native-testing-library

orbs:
codecov: codecov/codecov@3.2.2

jobs:
install-dependencies:
<<: *defaults
Expand Down Expand Up @@ -58,7 +61,8 @@ jobs:
- store_artifacts:
path: coverage
destination: coverage
test:react:17:
- codecov/upload
test-react-17:
<<: *defaults
steps:
- attach_workspace:
Expand All @@ -72,6 +76,11 @@ jobs:
at: ~/react-native-testing-library
- run: |
cd website && yarn install && yarn build
upload-code-coverage:
<<: *defaults
steps:
- codecov/upload:
file: coverage/coverage-final.json
deploy-website:
<<: *defaults
steps:
Expand All @@ -98,14 +107,17 @@ workflows:
- tests:
requires:
- install-dependencies
- test:react:17:
- test-react-17:
requires:
- install-dependencies
- test-website:
requires:
- install-dependencies
# docusuarus build is running when deploying website as well
filters: *filter-ignore-main
- upload-code-coverage:
requires:
- tests
- deploy-website:
requires:
- install-dependencies
Expand Down
4 changes: 4 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
coverage:
precision: 2
round: down
range: 70...100
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
"scripts": {
"clean": "del build",
"test": "jest",
"test:ci": "jest --maxWorkers=2",
"test:ci": "jest --maxWorkers=2 --collectCoverage=true --coverage-provider=v8",
"test:ci:react:17": "scripts/test_react_17",
"typecheck": "tsc",
"flow": "flow",
Expand Down