33name : Check
44
55on :
6- # Push to master will deploy a beta version
76 push :
87 branches : [master, renovate/**]
98 pull_request :
109 branches : [master]
1110
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+
1219jobs :
13- build_and_test :
14- name : Build & Test
20+ build :
1521 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]
1794
1895 strategy :
1996 fail-fast : false
2097 matrix :
2198 os : [ubuntu-latest, windows-2025]
2299 node-version : [18, 20, 22, 24]
23100
101+ runs-on : ${{ matrix.os }}
102+
24103 steps :
25104 - name : Mask secrets
26105 run : |
@@ -46,22 +125,61 @@ jobs:
46125 - name : Install Dependencies
47126 run : yarn
48127
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
50166 env :
51167 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
57169
58170 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+
60177 strategy :
61178 fail-fast : false
62179 matrix :
63180 os : [ubuntu-latest, windows-2025]
64181 python-version : ["3.9", "3.10", "3.11", "3.12"]
182+
65183 runs-on : ${{ matrix.os }}
66184
67185 steps :
@@ -71,17 +189,17 @@ jobs:
71189
72190 - uses : actions/checkout@v4
73191
74- - name : Use Node.js 22
192+ - name : Use Node.js ${{ env.LATEST_NODE_VERSION }}
75193 uses : actions/setup-node@v4
76194 with :
77- node-version : 22
195+ node-version : ${{ env.LATEST_NODE_VERSION }}
78196
79197 - name : Enable corepack
80198 run : |
81199 corepack enable
82200 corepack prepare yarn@stable --activate
83201
84- - name : Activate cache for Node.js 22
202+ - name : Activate cache for Node.js ${{ env.LATEST_NODE_VERSION }}
85203 uses : actions/setup-node@v4
86204 with :
87205 cache : yarn
@@ -97,28 +215,29 @@ jobs:
97215 - name : Run Python tests
98216 env :
99217 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
102219
103220 docs :
104- name : Docs build
105221 if : ${{ !contains(github.event.head_commit.message, '[skip ci]') }}
222+
223+ name : Docs build
224+
106225 runs-on : ubuntu-latest
226+
107227 steps :
108- - name : Checkout Source code
109- uses : actions/checkout@v4
228+ - uses : actions/checkout@v4
110229
111- - name : Use Node.js 22
230+ - name : Use Node.js ${{ env.LATEST_NODE_VERSION }}
112231 uses : actions/setup-node@v4
113232 with :
114- node-version : 22
233+ node-version : ${{ env.LATEST_NODE_VERSION }}
115234
116235 - name : Enable corepack
117236 run : |
118237 corepack enable
119238 corepack prepare yarn@stable --activate
120239
121- - name : Activate cache for Node.js 22
240+ - name : Activate cache for Node.js ${{ env.LATEST_NODE_VERSION }}
122241 uses : actions/setup-node@v4
123242 with :
124243 cache : yarn
@@ -132,40 +251,12 @@ jobs:
132251 yarn
133252 yarn build
134253
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]') }}
162256
163- - name : Run format checks
164- run : yarn format
257+ name : Bundles (${{ matrix.label }})
165258
166- build_bundles :
167- name : Build Test Bundles (${{ matrix.label }})
168- needs : [build_and_test]
259+ needs : [build]
169260
170261 strategy :
171262 fail-fast : false
@@ -183,17 +274,17 @@ jobs:
183274 steps :
184275 - uses : actions/checkout@v4
185276
186- - name : Use Node.js 22
277+ - name : Use Node.js ${{ env.LATEST_NODE_VERSION }}
187278 uses : actions/setup-node@v4
188279 with :
189- node-version : 22
280+ node-version : ${{ env.LATEST_NODE_VERSION }}
190281
191282 - name : Enable corepack
192283 run : |
193284 corepack enable
194285 corepack prepare yarn@stable --activate
195286
196- - name : Activate cache for Node.js 22
287+ - name : Activate cache for Node.js ${{ env.LATEST_NODE_VERSION }}
197288 uses : actions/setup-node@v4
198289 with :
199290 cache : yarn
@@ -206,6 +297,7 @@ jobs:
206297 if : ${{ matrix.os != 'windows-11-arm' }}
207298 with :
208299 bun-version-file : .bun-version
300+ no-cache : true
209301
210302 - name : Install bun (Windows ARM)
211303 if : ${{ matrix.os == 'windows-11-arm' }}
0 commit comments