forked from babel/babel
-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
config.yml
216 lines (198 loc) · 5.93 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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
version: 2.1
aliases:
- &restore-yarn-cache
key: v2-yarn-cache-{{ checksum "yarn.lock" }}
- &save-yarn-cache
paths:
- ~/.yarn/berry/cache
key: v2-yarn-cache-{{ checksum "yarn.lock" }}
- &artifact_babel
path: ~/babel/packages/babel-standalone/babel.js
- &artifact_babel_min
path: ~/babel/packages/babel-standalone/babel.min.js
- &test262_workdir
working_directory: ~/babel/babel-test262-runner
- &artifact_test262_tap
path: ~/test262.tap
- &artifact_test262_xunit
path: ~/test-results
- &artifact_test262_diff_tap
path: ~/diff.tap
executors:
node-executor:
docker:
- image: circleci/node:latest
working_directory: ~/babel
# e2e-vue-cli test requires chromium
node-browsers-executor:
docker:
- image: circleci/node:latest-browsers
working_directory: ~/babel
jobs:
build-standalone:
executor: node-executor
steps:
- checkout
- restore_cache: *restore-yarn-cache
# Builds babel-standalone with the regular Babel config
# test-ci-coverage doesn't test babel-standalone, as trying to gather coverage
- run: IS_PUBLISH=true make -j build-standalone-ci
# data for a JS file that's several megabytes large is bound to fail. Here,
# we just run the babel-standalone test separately.
- run: yarn jest "\-standalone/test"
- store_artifacts: *artifact_babel
- store_artifacts: *artifact_babel_min
- save_cache: *save-yarn-cache
test262:
executor: node-executor
steps:
- checkout
- run:
name: Sync with latest main branch (only on PRs)
command: |
if [ -n "$CIRCLE_PULL_REQUEST" ]
then
git fetch origin refs/pull/$CIRCLE_PR_NUMBER/merge
git checkout -qf FETCH_HEAD
fi
- restore_cache: *restore-yarn-cache
- run:
name: Build Babel
command: BABEL_ENV=test make bootstrap
- run:
name: Setup Test Runner
command: |
git clone --depth=1 --recurse-submodules https://github.com/babel/babel-test262-runner
cd babel-test262-runner
npm ci
npm i tap-mocha-reporter --save-dev
node lib/download-node
- run:
name: Download main branch Test262 artifact
command: node lib/download-main-artifact ~/test262-main.tap
<<: *test262_workdir
- run:
name: Run Test262
command: BABEL_PATH=.. node lib/run-tests I_AM_SURE | tee ~/test262.tap
<<: *test262_workdir
- store_artifacts: *artifact_test262_tap
- run:
name: Output Test262 results
command: |
cat ~/test262.tap | $(npm bin)/tap-mocha-reporter spec || true
<<: *test262_workdir
- run:
name: Compare previous main branch & current job results
command: |
mkdir -p ~/test-results/test262
node lib/compare-results ~/test262-main.tap ~/test262.tap | tee ~/diff.tap
<<: *test262_workdir
- store_artifacts: *artifact_test262_diff_tap
- run:
name: Output comparison results and report to CircleCI
command: |
mkdir -p ~/test-results/test262
cat ~/diff.tap | $(npm bin)/tap-merge | $(npm bin)/tap-mocha-reporter xunit | tee ~/test-results/test262/results.xml
<<: *test262_workdir
- store_test_results: *artifact_test262_xunit
- save_cache: *save-yarn-cache
publish-verdaccio:
executor: node-executor
steps:
- checkout
- restore_cache: *restore-yarn-cache
- run: ./scripts/integration-tests/publish-local.sh
- persist_to_workspace:
root: /tmp/verdaccio-workspace
paths:
- storage
- htpasswd
- save_cache: *save-yarn-cache
e2e-babel:
executor: node-executor
steps:
- checkout
- attach_workspace:
at: /tmp/verdaccio-workspace
- run: ./scripts/integration-tests/e2e-babel.sh
e2e-babel-old-version:
executor: node-executor
steps:
- checkout
- attach_workspace:
at: /tmp/verdaccio-workspace
- run: ./scripts/integration-tests/e2e-babel-old-version.sh
e2e-create-react-app:
executor: node-executor
steps:
- checkout
- attach_workspace:
at: /tmp/verdaccio-workspace
- run: ./scripts/integration-tests/e2e-create-react-app.sh
e2e-vue-cli:
executor: node-browsers-executor
steps:
- checkout
- attach_workspace:
at: /tmp/verdaccio-workspace
- run: ./scripts/integration-tests/e2e-vue-cli.sh
e2e-jest:
executor: node-executor
steps:
- checkout
- attach_workspace:
at: /tmp/verdaccio-workspace
- run: ./scripts/integration-tests/e2e-jest.sh
workflows:
version: 2
build-standalone:
jobs:
- build-standalone
test262:
jobs:
- test262:
filters:
branches:
only:
- main
- next-8-dev
- next-8-rebased
test262-pr:
jobs:
- approve-test262-run:
type: approval
filters:
branches:
ignore:
- main
- master
- next-8-dev
- next-8-rebased
- test262:
requires:
- approve-test262-run
filters:
branches:
ignore:
- main
- master
- next-8-dev
- next-8-rebased
e2e:
jobs:
- publish-verdaccio
- e2e-babel:
requires:
- publish-verdaccio
- e2e-babel-old-version:
requires:
- publish-verdaccio
- e2e-create-react-app:
requires:
- publish-verdaccio
- e2e-vue-cli:
requires:
- publish-verdaccio
- e2e-jest:
requires:
- publish-verdaccio