Skip to content

Commit bbd1b17

Browse files
fwoutssatya164
authored andcommitted
chore: set up CircleCI (#8)
1 parent 96dbe72 commit bbd1b17

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

.circleci/config.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
version: 2.1
2+
job_configuration: &job_configuration
3+
docker:
4+
- image: circleci/node:10-stretch
5+
working_directory: ~/repo
6+
jobs:
7+
test:
8+
<<: *job_configuration
9+
steps:
10+
- checkout
11+
- restore_cache:
12+
keys:
13+
- v3-dependencies-{{ checksum "package.json" }}
14+
- v3-dependencies-
15+
- run: yarn install --frozen-lockfile
16+
- save_cache:
17+
paths:
18+
- node_modules
19+
key: v3-dependencies-{{ checksum "package.json" }}
20+
- run:
21+
name: Run tests
22+
command: yarn test
23+
lint:
24+
<<: *job_configuration
25+
steps:
26+
- checkout
27+
- restore_cache:
28+
keys:
29+
- v3-dependencies-{{ checksum "package.json" }}
30+
- v3-dependencies-
31+
- run: yarn install --frozen-lockfile
32+
- save_cache:
33+
paths:
34+
- node_modules
35+
key: v3-dependencies-{{ checksum "package.json" }}
36+
- run:
37+
name: ESLint
38+
command: |
39+
yarn lint
40+
- run:
41+
name: Prettier (needed for TS files)
42+
command: |
43+
yarn prettier --list-different "**/*.js" "**/*.ts"
44+
workflows:
45+
test:
46+
jobs:
47+
- test
48+
- lint

0 commit comments

Comments
 (0)