/
config.yml
127 lines (117 loc) · 3.21 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
aliases:
- &restore-cache
keys:
- v2-dependencies-{{ .Branch }}-{{ checksum "yarn.lock" }}
# Fallback in case checksum fails
- v2-dependencies-{{ .Branch }}-
- &save-cache
paths:
- node_modules
- website/node_modules
key: v2-dependencies-{{ .Branch }}-{{ checksum "yarn.lock" }}
- &filter-ignore-gh-pages
branches:
ignore: gh-pages
- &install node scripts/remove-postinstall && yarn --no-progress --frozen-lockfile --ignore-engines && node scripts/build
version: 2
jobs:
lint-and-typecheck:
working_directory: ~/jest
docker:
- image: circleci/node:10
steps:
- checkout
- restore-cache: *restore-cache
- run: yarn --no-progress --frozen-lockfile
- save-cache: *save-cache
- run: yarn lint --format junit -o reports/junit/js-lint-results.xml && yarn lint-es5-build --format junit -o reports/junit/js-es5-lint-results.xml && yarn lint:prettier:ci && yarn check-copyright-headers
- store_test_results:
path: reports/junit
test-node-8:
working_directory: ~/jest
docker:
- image: circleci/node:8
steps:
- checkout
- restore-cache: *restore-cache
- run: *install
- save-cache: *save-cache
- run:
command: yarn test-ci-partial
- store_test_results:
path: reports/junit
test-node-10:
working_directory: ~/jest
docker:
- image: circleci/node:10
steps:
- checkout
- restore-cache: *restore-cache
- run: *install
- save-cache: *save-cache
- run:
command: yarn test-ci
- store_test_results:
path: reports/junit
test-jest-circus:
working_directory: ~/jest
docker:
- image: circleci/node:10
steps:
- checkout
- restore-cache: *restore-cache
- run: *install
- save-cache: *save-cache
- run:
command: JEST_CIRCUS=1 yarn test-ci-partial
- store_test_results:
path: reports/junit
test-node-11:
working_directory: ~/jest
docker:
- image: circleci/node:11
steps:
- checkout
- restore-cache: *restore-cache
- run: *install
- save-cache: *save-cache
- run:
command: yarn test-ci-partial
- store_test_results:
path: reports/junit
test-browser:
working_directory: ~/jest
docker:
- image: circleci/node:10-browsers
steps:
- checkout
- restore-cache: *restore-cache
- run: *install
- save-cache: *save-cache
- run: yarn test-ci-es5-build-in-browser
test-or-deploy-website:
working_directory: ~/jest
docker:
- image: circleci/node:10
resource_class: large
steps:
- checkout
- restore-cache: *restore-cache
- run: *install
- save-cache: *save-cache
- run:
name: Test or Deploy Jest Website
command: ./.circleci/website.sh
# Workflows enables us to run multiple jobs in parallel
workflows:
version: 2
build-and-deploy:
jobs:
- lint-and-typecheck
- test-node-8
- test-node-10
- test-jest-circus
- test-node-11 # current
- test-browser
- test-or-deploy-website:
filters: *filter-ignore-gh-pages