Skip to content

Commit 32c286d

Browse files
committedJun 19, 2020
chore: Add circleci
1 parent 378bf56 commit 32c286d

File tree

3 files changed

+101
-1
lines changed

3 files changed

+101
-1
lines changed
 

‎.circleci/config.yml

+98
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
version: 2.1
2+
3+
executors:
4+
default:
5+
docker:
6+
- image: circleci/node:10
7+
working_directory: ~/project
8+
9+
commands:
10+
attach_project:
11+
steps:
12+
- attach_workspace:
13+
at: ~/project
14+
15+
jobs:
16+
install-dependencies:
17+
executor: default
18+
steps:
19+
- checkout
20+
- attach_project
21+
- restore_cache:
22+
keys:
23+
- dependencies-{{ checksum "package.json" }}
24+
- dependencies-
25+
- restore_cache:
26+
keys:
27+
- dependencies-example-{{ checksum "example/package.json" }}
28+
- dependencies-example-
29+
- run:
30+
name: Install dependencies
31+
command: |
32+
yarn install --cwd example --frozen-lockfile
33+
yarn install --frozen-lockfile
34+
- save_cache:
35+
key: dependencies-{{ checksum "package.json" }}
36+
paths: node_modules
37+
- save_cache:
38+
key: dependencies-example-{{ checksum "example/package.json" }}
39+
paths: example/node_modules
40+
- persist_to_workspace:
41+
root: .
42+
paths: .
43+
44+
lint:
45+
executor: default
46+
steps:
47+
- attach_project
48+
- run:
49+
name: Lint files
50+
command: |
51+
yarn lint
52+
53+
typescript:
54+
executor: default
55+
steps:
56+
- attach_project
57+
- run:
58+
name: Typecheck files
59+
command: |
60+
yarn typescript
61+
62+
unit-tests:
63+
executor: default
64+
steps:
65+
- attach_project
66+
- run:
67+
name: Run unit tests
68+
command: |
69+
yarn test --coverage
70+
- store_artifacts:
71+
path: coverage
72+
destination: coverage
73+
74+
build-package:
75+
executor: default
76+
steps:
77+
- attach_project
78+
- run:
79+
name: Build package
80+
command: |
81+
yarn prepare
82+
83+
workflows:
84+
build-and-test:
85+
jobs:
86+
- install-dependencies
87+
- lint:
88+
requires:
89+
- install-dependencies
90+
- typescript:
91+
requires:
92+
- install-dependencies
93+
- unit-tests:
94+
requires:
95+
- install-dependencies
96+
- build-package:
97+
requires:
98+
- install-dependencies

‎.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ node_modules/
4646
npm-debug.log
4747
yarn-debug.log
4848
yarn-error.log
49+
coverage/
4950

5051
# BUCK
5152
buck-out/

‎package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,8 @@
118118
},
119119
"eslintIgnore": [
120120
"node_modules/",
121-
"lib/"
121+
"lib/",
122+
"coverage"
122123
],
123124
"homepage": "https://github.com/alexbrazier/react-native-network-logger.git",
124125
"@react-native-community/bob": {

0 commit comments

Comments
 (0)
Please sign in to comment.