3
3
name : Check
4
4
5
5
on :
6
- # Push to master will deploy a beta version
7
6
push :
8
7
branches : [master, renovate/**]
9
8
pull_request :
10
9
branches : [master]
11
10
11
+ env :
12
+ LATEST_NODE_VERSION : 22
13
+ APIFY_CLI_DISABLE_TELEMETRY : 1
14
+
15
+ concurrency :
16
+ cancel-in-progress : false
17
+ group : checks-${{ github.ref }}
18
+
12
19
jobs :
13
- build_and_test :
14
- name : Build & Test
20
+ build :
15
21
if : ${{ !contains(github.event.head_commit.message, '[skip ci]') }}
16
- runs-on : ${{ matrix.os }}
22
+
23
+ name : Build
24
+
25
+ runs-on : ubuntu-latest
26
+
27
+ steps :
28
+ - uses : actions/checkout@v4
29
+
30
+ - name : Use Node.js ${{ env.LATEST_NODE_VERSION }}
31
+ uses : actions/setup-node@v4
32
+ with :
33
+ node-version : ${{ env.LATEST_NODE_VERSION }}
34
+
35
+ - name : Enable corepack
36
+ run : |
37
+ corepack enable
38
+ corepack prepare yarn@stable --activate
39
+
40
+ - name : Activate cache for Node.js ${{ env.LATEST_NODE_VERSION }}
41
+ uses : actions/setup-node@v4
42
+ with :
43
+ cache : yarn
44
+
45
+ - name : Install Dependencies
46
+ run : yarn
47
+
48
+ - name : Run TSC
49
+ run : yarn build
50
+
51
+ - name : Ensure the reference documentation builds
52
+ run : yarn update-docs
53
+
54
+ lint :
55
+ if : ${{ !contains(github.event.head_commit.message, '[skip ci]') }}
56
+
57
+ name : Lint & Format
58
+
59
+ runs-on : ubuntu-latest
60
+
61
+ steps :
62
+ - uses : actions/checkout@v4
63
+
64
+ - name : Use Node.js ${{ env.LATEST_NODE_VERSION }}
65
+ uses : actions/setup-node@v4
66
+ with :
67
+ node-version : ${{ env.LATEST_NODE_VERSION }}
68
+
69
+ - name : Enable corepack
70
+ run : |
71
+ corepack enable
72
+ corepack prepare yarn@stable --activate
73
+
74
+ - name : Activate cache for Node.js ${{ env.LATEST_NODE_VERSION }}
75
+ uses : actions/setup-node@v4
76
+ with :
77
+ cache : yarn
78
+
79
+ - name : Install Dependencies
80
+ run : yarn
81
+
82
+ - name : Run lint checks
83
+ run : yarn lint
84
+
85
+ - name : Run format checks
86
+ run : yarn format
87
+
88
+ test_local :
89
+ if : ${{ !contains(github.event.head_commit.message, '[skip ci]') }}
90
+
91
+ name : Local Tests
92
+
93
+ needs : [build]
17
94
18
95
strategy :
19
96
fail-fast : false
20
97
matrix :
21
98
os : [ubuntu-latest, windows-2025]
22
99
node-version : [18, 20, 22, 24]
23
100
101
+ runs-on : ${{ matrix.os }}
102
+
24
103
steps :
25
104
- name : Mask secrets
26
105
run : |
@@ -46,22 +125,61 @@ jobs:
46
125
- name : Install Dependencies
47
126
run : yarn
48
127
49
- - name : Run Tests
128
+ - name : Run local tests
129
+ run : yarn test:local
130
+
131
+ test_api :
132
+ if : ${{ !contains(github.event.head_commit.message, '[skip ci]') }}
133
+
134
+ name : API Tests
135
+
136
+ needs : [build]
137
+
138
+ runs-on : ubuntu-latest
139
+
140
+ steps :
141
+ - name : Mask secrets
142
+ run : |
143
+ echo "::add-mask::${{ secrets.APIFY_TEST_USER_API_TOKEN }}"
144
+
145
+ - uses : actions/checkout@v4
146
+
147
+ - name : Use Node.js ${{ env.LATEST_NODE_VERSION }}
148
+ uses : actions/setup-node@v4
149
+ with :
150
+ node-version : ${{ env.LATEST_NODE_VERSION }}
151
+
152
+ - name : Enable corepack
153
+ run : |
154
+ corepack enable
155
+ corepack prepare yarn@stable --activate
156
+
157
+ - name : Activate cache for Node.js ${{ env.LATEST_NODE_VERSION }}
158
+ uses : actions/setup-node@v4
159
+ with :
160
+ cache : yarn
161
+
162
+ - name : Install Dependencies
163
+ run : yarn
164
+
165
+ - name : Run API tests
50
166
env :
51
167
TEST_USER_TOKEN : ${{ secrets.APIFY_TEST_USER_API_TOKEN }}
52
- APIFY_CLI_DISABLE_TELEMETRY : 1
53
- run : yarn test
54
-
55
- # - name: Ensure the reference documentation builds
56
- # run: yarn update-docs
168
+ run : yarn test:api
57
169
58
170
test_python_support :
59
- name : Test Python template support
171
+ if : ${{ !contains(github.event.head_commit.message, '[skip ci]') }}
172
+
173
+ name : Python Support
174
+
175
+ needs : [build]
176
+
60
177
strategy :
61
178
fail-fast : false
62
179
matrix :
63
180
os : [ubuntu-latest, windows-2025]
64
181
python-version : ["3.9", "3.10", "3.11", "3.12"]
182
+
65
183
runs-on : ${{ matrix.os }}
66
184
67
185
steps :
@@ -71,17 +189,17 @@ jobs:
71
189
72
190
- uses : actions/checkout@v4
73
191
74
- - name : Use Node.js 22
192
+ - name : Use Node.js ${{ env.LATEST_NODE_VERSION }}
75
193
uses : actions/setup-node@v4
76
194
with :
77
- node-version : 22
195
+ node-version : ${{ env.LATEST_NODE_VERSION }}
78
196
79
197
- name : Enable corepack
80
198
run : |
81
199
corepack enable
82
200
corepack prepare yarn@stable --activate
83
201
84
- - name : Activate cache for Node.js 22
202
+ - name : Activate cache for Node.js ${{ env.LATEST_NODE_VERSION }}
85
203
uses : actions/setup-node@v4
86
204
with :
87
205
cache : yarn
@@ -97,28 +215,29 @@ jobs:
97
215
- name : Run Python tests
98
216
env :
99
217
TEST_USER_TOKEN : ${{ secrets.APIFY_TEST_USER_API_TOKEN }}
100
- APIFY_CLI_DISABLE_TELEMETRY : 1
101
- run : yarn test-python
218
+ run : yarn test:python
102
219
103
220
docs :
104
- name : Docs build
105
221
if : ${{ !contains(github.event.head_commit.message, '[skip ci]') }}
222
+
223
+ name : Docs build
224
+
106
225
runs-on : ubuntu-latest
226
+
107
227
steps :
108
- - name : Checkout Source code
109
- uses : actions/checkout@v4
228
+ - uses : actions/checkout@v4
110
229
111
- - name : Use Node.js 22
230
+ - name : Use Node.js ${{ env.LATEST_NODE_VERSION }}
112
231
uses : actions/setup-node@v4
113
232
with :
114
- node-version : 22
233
+ node-version : ${{ env.LATEST_NODE_VERSION }}
115
234
116
235
- name : Enable corepack
117
236
run : |
118
237
corepack enable
119
238
corepack prepare yarn@stable --activate
120
239
121
- - name : Activate cache for Node.js 22
240
+ - name : Activate cache for Node.js ${{ env.LATEST_NODE_VERSION }}
122
241
uses : actions/setup-node@v4
123
242
with :
124
243
cache : yarn
@@ -132,40 +251,12 @@ jobs:
132
251
yarn
133
252
yarn build
134
253
135
- lint :
136
- name : Lint
137
- runs-on : ubuntu-latest
138
-
139
- steps :
140
- - uses : actions/checkout@v4
141
-
142
- - name : Use Node.js 22
143
- uses : actions/setup-node@v4
144
- with :
145
- node-version : 22
146
-
147
- - name : Enable corepack
148
- run : |
149
- corepack enable
150
- corepack prepare yarn@stable --activate
151
-
152
- - name : Activate cache for Node.js 22
153
- uses : actions/setup-node@v4
154
- with :
155
- cache : yarn
156
-
157
- - name : Install Dependencies
158
- run : yarn
159
-
160
- - name : Run lint checks
161
- run : yarn lint
254
+ build_bundles :
255
+ if : ${{ !contains(github.event.head_commit.message, '[skip ci]') }}
162
256
163
- - name : Run format checks
164
- run : yarn format
257
+ name : Bundles (${{ matrix.label }})
165
258
166
- build_bundles :
167
- name : Build Test Bundles (${{ matrix.label }})
168
- needs : [build_and_test]
259
+ needs : [build]
169
260
170
261
strategy :
171
262
fail-fast : false
@@ -183,17 +274,17 @@ jobs:
183
274
steps :
184
275
- uses : actions/checkout@v4
185
276
186
- - name : Use Node.js 22
277
+ - name : Use Node.js ${{ env.LATEST_NODE_VERSION }}
187
278
uses : actions/setup-node@v4
188
279
with :
189
- node-version : 22
280
+ node-version : ${{ env.LATEST_NODE_VERSION }}
190
281
191
282
- name : Enable corepack
192
283
run : |
193
284
corepack enable
194
285
corepack prepare yarn@stable --activate
195
286
196
- - name : Activate cache for Node.js 22
287
+ - name : Activate cache for Node.js ${{ env.LATEST_NODE_VERSION }}
197
288
uses : actions/setup-node@v4
198
289
with :
199
290
cache : yarn
@@ -206,6 +297,7 @@ jobs:
206
297
if : ${{ matrix.os != 'windows-11-arm' }}
207
298
with :
208
299
bun-version-file : .bun-version
300
+ no-cache : true
209
301
210
302
- name : Install bun (Windows ARM)
211
303
if : ${{ matrix.os == 'windows-11-arm' }}
0 commit comments