1
- name : Node.js CI
1
+ name : Pull Request CI
2
2
3
3
on :
4
4
pull_request :
@@ -9,80 +9,9 @@ concurrency:
9
9
cancel-in-progress : true
10
10
11
11
jobs :
12
- install :
13
- name : Install node modules
14
- runs-on : ubuntu-latest
15
- steps :
16
- - name : Checkout Repo
17
- uses : actions/checkout@v2
18
-
19
- - name : Use Node.js 16
20
- uses : actions/setup-node@v3
21
- with :
22
- node-version : ' 16'
23
- cache : yarn
24
- cache-dependency-path : ' yarn.lock'
25
-
26
- - name : Install
27
- run : yarn install --frozen-lockfile --prefer-offline
28
-
29
- outputs :
30
- yarn-cache-dir : ${{ steps.get-yarn-cache-dir.outputs.dir }}
31
-
32
- lints :
12
+ lint :
33
13
name : Check lints
34
14
runs-on : ubuntu-latest
35
- needs : install
36
- steps :
37
- - uses : actions/checkout@v2
38
-
39
- - name : Use Node.js 16
40
- uses : actions/setup-node@v3
41
- with :
42
- node-version : ' 16'
43
- cache : yarn
44
- cache-dependency-path : ' yarn.lock'
45
-
46
- - run : yarn install --frozen-lockfile --prefer-offline
47
-
48
- - name : prettier
49
- run : yarn check:prettier
50
-
51
- - name : eslint
52
- run : yarn check:eslint --format junit -o reports/junit/js-lint-results.xml
53
-
54
- types :
55
- name : Check types
56
- runs-on : ubuntu-latest
57
- needs : install
58
- steps :
59
- - uses : actions/checkout@v2
60
-
61
- - name : Use Node.js 16
62
- uses : actions/setup-node@v3
63
- with :
64
- node-version : ' 16'
65
- cache : yarn
66
- cache-dependency-path : ' yarn.lock'
67
-
68
- - run : yarn install --frozen-lockfile --prefer-offline
69
-
70
- - uses : actions/cache/restore@v3
71
- name : Restore TS cache
72
- id : ts-cache
73
- with :
74
- path : |
75
- **/dist/**/*.ts
76
- !**/node_modules
77
- key : ${{ runner.os }}-ts-cache-${{ hashFiles('**/tsconfig.js', '**/package.tsconfig.js', '**/src/', '**/scripts/', '!**/node_modules', '!**/dist') }}
78
-
79
- - name : types
80
- run : yarn check:ts
81
-
82
- deps :
83
- name : Check dependency list
84
- runs-on : ubuntu-latest
85
- needs : install
86
15
steps :
87
16
- uses : actions/checkout@v2
88
17
@@ -95,16 +24,15 @@ jobs:
95
24
96
25
- run : yarn install --frozen-lockfile --prefer-offline
97
26
98
- - name : deps
99
- run : yarn check:deps
27
+ - name : lint
28
+ run : yarn lint
100
29
101
- - name : package.json versions
102
- run : yarn check:package-json
30
+ outputs :
31
+ yarn-cache-dir : ${{ steps.get-yarn-cache-dir.outputs.dir }}
103
32
104
33
build :
105
34
name : Build packages
106
35
runs-on : ubuntu-latest
107
- needs : [install, lints]
108
36
steps :
109
37
- uses : actions/checkout@v2
110
38
@@ -132,44 +60,12 @@ jobs:
132
60
133
61
- name : build
134
62
if : ${{ steps.build-cache.outputs.cache-hit != 'true' }}
135
- run : yarn build:packages
136
-
137
- build-ts :
138
- name : Build TypeScript
139
- runs-on : ubuntu-latest
140
- needs : [install, lints]
141
- steps :
142
- - uses : actions/checkout@v2
143
-
144
- - uses : actions/cache@v3
145
- name : Check for ts cache
146
- id : ts-cache
147
- with :
148
- path : |
149
- **/dist/**/*.ts
150
- !**/node_modules
151
- key : ${{ runner.os }}-ts-cache-${{ hashFiles('**/tsconfig.js', '**/package.tsconfig.js', '**/src/', '**/scripts/', '!**/node_modules', '!**/dist') }}
152
-
153
- - name : Use Node.js 16
154
- if : ${{ steps.ts-cache.outputs.cache-hit != 'true' }}
155
- uses : actions/setup-node@v3
156
- with :
157
- node-version : ' 16'
158
- cache : yarn
159
- cache-dependency-path : ' yarn.lock'
160
-
161
- - name : Install
162
- if : ${{ steps.ts-cache.outputs.cache-hit != 'true' }}
163
- run : yarn install --frozen-lockfile --prefer-offline
164
-
165
- - name : build-ts
166
- if : ${{ steps.ts-cache.outputs.cache-hit != 'true' }}
167
- run : yarn build:ts
63
+ run : yarn build
168
64
169
65
chromatic :
170
66
name : Chromatic
171
67
runs-on : ubuntu-latest
172
- needs : [install, build]
68
+ needs : [build]
173
69
steps :
174
70
- name : Checkout
175
71
uses : actions/checkout@v2
@@ -205,7 +101,7 @@ jobs:
205
101
tests :
206
102
name : Run tests
207
103
runs-on : ubuntu-latest
208
- needs : [install, build]
104
+ needs : [build]
209
105
steps :
210
106
- uses : actions/checkout@v2
211
107
@@ -235,7 +131,7 @@ jobs:
235
131
tests-ssr :
236
132
name : Run tests with artificial server rendering
237
133
runs-on : ubuntu-latest
238
- needs : [install, build]
134
+ needs : [build]
239
135
steps :
240
136
- uses : actions/checkout@v2
241
137
@@ -262,10 +158,10 @@ jobs:
262
158
env :
263
159
JEST_JUNIT_OUTPUT : ' reports/junit/js-test-ssr-results.xml'
264
160
265
- checkBuilds :
266
- name : Verify builds
161
+ validate-builds :
162
+ name : Validate builds & dependencies
267
163
runs-on : ubuntu-latest
268
- needs : [install, build, build-ts ]
164
+ needs : [build]
269
165
steps :
270
166
- uses : actions/checkout@v2
271
167
@@ -296,36 +192,5 @@ jobs:
296
192
!**/node_modules
297
193
key : ${{ runner.os }}-ts-cache-${{ hashFiles('**/tsconfig.js', '**/package.tsconfig.js', '**/src/', '**/scripts/', '!**/node_modules', '!**/dist') }}
298
194
299
- - name : check builds
300
- run : yarn check:builds
301
-
302
- sizeDiff :
303
- name : Check file size
304
- runs-on : ubuntu-latest
305
- needs : install
306
- steps :
307
- - uses : actions/checkout@v2
308
-
309
- - name : Use Node.js 16
310
- uses : actions/setup-node@v3
311
- with :
312
- node-version : ' 16'
313
- cache : yarn
314
- cache-dependency-path : ' yarn.lock'
315
-
316
- - run : yarn install --frozen-lockfile --prefer-offline
317
-
318
- - uses : actions/cache/restore@v3
319
- name : Restore build cache
320
- id : build-cache
321
- with :
322
- path : |
323
- **/dist
324
- !**/node_modules
325
- key : ${{ runner.os }}-build-cache-${{ hashFiles('**/rollup.config.js', '**/babel.config.js', '**/src/', '**/scripts/', '!**/node_modules', '!**/dist') }}
326
-
327
- - uses : preactjs/compressed-size-action@v2
328
- with :
329
- repo-token : ${{ secrets.GITHUB_TOKEN }}
330
- clean-script : ' clean:builds && clean:modules'
331
- build-script : ' build:packages'
195
+ - name : validate
196
+ run : yarn validate
0 commit comments