mirror of
https://github.com/callstack/react-native-testing-library.git
synced 2026-09-18 23:09:04 +08:00
chore: setup circleci
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
version: 2
|
||||
|
||||
defaults: &defaults
|
||||
docker:
|
||||
- image: circleci/node:10
|
||||
working_directory: ~/react-native-testing-library
|
||||
|
||||
jobs:
|
||||
install-dependencies:
|
||||
<<: *defaults
|
||||
steps:
|
||||
- checkout
|
||||
- attach_workspace:
|
||||
at: ~/react-native-testing-library
|
||||
- restore_cache:
|
||||
keys:
|
||||
- dependencies-{{ checksum "package.json" }}
|
||||
- dependencies-
|
||||
- run: yarn install --frozen-lockfile
|
||||
- save_cache:
|
||||
key: dependencies-{{ checksum "package.json" }}
|
||||
paths:
|
||||
- node_modules
|
||||
- persist_to_workspace:
|
||||
root: .
|
||||
paths:
|
||||
- .
|
||||
lint-and-flow:
|
||||
<<: *defaults
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: ~/react-native-testing-library
|
||||
- run: |
|
||||
yarn lint
|
||||
yarn flow-check
|
||||
tests:
|
||||
<<: *defaults
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: ~/react-native-testing-library
|
||||
- run: yarn test
|
||||
- store_artifacts:
|
||||
path: coverage
|
||||
destination: coverage
|
||||
|
||||
workflows:
|
||||
version: 2
|
||||
build-and-test:
|
||||
jobs:
|
||||
- install-dependencies
|
||||
- lint-and-flow:
|
||||
requires:
|
||||
- install-dependencies
|
||||
- tests:
|
||||
requires:
|
||||
- install-dependencies
|
||||
@@ -1,2 +1,5 @@
|
||||
[libs]
|
||||
flow-typed
|
||||
|
||||
[options]
|
||||
include_warnings=true
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
node_modules
|
||||
*.log
|
||||
.eslintcache
|
||||
|
||||
@@ -28,5 +28,10 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"react-is": "^16.5.2"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "jest",
|
||||
"flow-check": "flow check",
|
||||
"lint": "eslint src --cache"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user