forked from changesets/changesets
/
config.yml
83 lines (80 loc) 路 2.22 KB
/
config.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
version: 3
jobs:
test:
docker:
- image: circleci/node:12.22.2
working_directory: ~/repo
steps:
- checkout
- restore_cache:
keys:
- v2-dependencies-{{ checksum "yarn.lock" }}
# fallback to using the latest cache if no exact match is found
- v2-dependencies-
- run:
name: Install
command: yarn install --pure-lockfile
- run:
name: Check Git version
command: git --version
- run:
name: "Git Setup"
command: git config --global user.email "you@example.com" && git config --global user.name "Your Name"
- run:
name: "Jest Tests"
command: yarn jest --ci --runInBand --coverage --reporters=default --reporters=jest-junit
environment:
JEST_JUNIT_OUTPUT: "reports/junit/js-test-results.xml"
- run:
name: "Upload Coverage"
command: yarn codecov
- store_test_results:
path: reports/junit
- store_artifacts:
path: reports/junit
- save_cache:
paths:
- ~/.cache/yarn
- node_modules
key: v1-dependencies-{{ checksum "yarn.lock" }}
typescript:
docker:
- image: circleci/node:12.22.2
working_directory: ~/repo
steps:
- checkout
- restore_cache:
keys:
- v2-dependencies-{{ checksum "yarn.lock" }}
# fallback to using the latest cache if no exact match is found
- v2-dependencies-
- run:
name: Install
command: yarn install --pure-lockfile
- run:
name: "Typescript"
command: yarn types:check
lint:
docker:
- image: circleci/node:12.22.2
working_directory: ~/repo
steps:
- checkout
- restore_cache:
keys:
- v2-dependencies-{{ checksum "yarn.lock" }}
# fallback to using the latest cache if no exact match is found
- v2-dependencies-
- run:
name: Install
command: yarn install --pure-lockfile
- run:
name: "ESLint"
command: yarn lint
workflows:
version: 2
test:
jobs:
- test
- lint
- typescript