21
21
# Increase wasm test timeout from 20 seconds (default) to 1 minute.
22
22
WASM_BINDGEN_TEST_TIMEOUT : 60
23
23
24
+ # DO NOT MERGE THIS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
24
25
jobs :
25
- check :
26
- name : Cargo check
27
- runs-on : ubuntu-latest
28
- steps :
29
- - name : Checkout sources
30
- uses : actions/checkout@v4
31
-
32
- - name : Use substrate-node binary
33
- uses : ./.github/workflows/actions/use-substrate
34
-
35
- - name : Install Rust stable toolchain
36
- uses : actions-rs/toolchain@v1
37
- with :
38
- profile : minimal
39
- toolchain : stable
40
- override : true
41
-
42
- - name : Rust Cache
43
- uses : Swatinem/rust-cache@3cf7f8cc28d1b4e7d01e3783be10a97d55d483c8 # v2.7.1
44
-
45
- - name : Install cargo-hack
46
- uses : baptiste0928/cargo-install@v2
47
- with :
48
- crate : cargo-hack
49
- version : 0.5
50
-
51
- # A basic check over all targets together. This may lead to features being combined etc,
52
- # and doesn't test combinations of different features.
53
- - name : Cargo check all targets.
54
- run : cargo check --all-targets
55
-
56
- # Next, check subxt features.
57
- # - `native` feature must always be enabled
58
- # - `web` feature is always ignored.
59
- # - This means, don't check --no-default-features and don't try enabling --all-features; both will fail
60
- - name : Cargo hack; check each subxt feature
61
- run : cargo hack -p subxt --each-feature check --exclude-no-default-features --exclude-all-features --exclude-features web --features native
62
-
63
- # Subxt-signer has the "subxt" features enabled in the "check all targets" test. Run it on its own to
64
- # check it without. We can't enable subxt or web features here, so no cargo hack.
65
- - name : Cargo check subxt-signer
66
- run : |
67
- cargo check -p subxt-signer
68
- cargo check -p subxt-signer --no-default-features --features sr25519,native
69
- cargo check -p subxt-signer --no-default-features --features ecdsa,native
70
-
71
- # We can't enable web features here, so no cargo hack.
72
- - name : Cargo check subxt-lightclient
73
- run : cargo check -p subxt-lightclient
74
-
75
- # Next, check each other package in isolation.
76
- - name : Cargo hack; check each feature/crate on its own
77
- run : cargo hack --exclude subxt --exclude subxt-signer --exclude subxt-lightclient --exclude-all-features --each-feature check --workspace
78
-
79
- # Check the parachain-example code, which isn't a part of the workspace so is otherwise ignored.
80
- - name : Cargo check parachain-example
81
- run : cargo check --manifest-path examples/parachain-example/Cargo.toml
82
-
83
- wasm_check :
84
- name : Cargo check (WASM)
85
- runs-on : ubuntu-latest
86
- steps :
87
- - name : Checkout sources
88
- uses : actions/checkout@v4
89
-
90
- - name : Install Rust stable toolchain
91
- uses : actions-rs/toolchain@v1
92
- with :
93
- profile : minimal
94
- toolchain : stable
95
- target : wasm32-unknown-unknown
96
- override : true
97
-
98
- - name : Rust Cache
99
- uses : Swatinem/rust-cache@3cf7f8cc28d1b4e7d01e3783be10a97d55d483c8 # v2.7.1
100
-
101
- # Check WASM examples, which aren't a part of the workspace and so are otherwise missed:
102
- - name : Cargo check WASM examples
103
- run : |
104
- cargo check --manifest-path examples/wasm-example/Cargo.toml --target wasm32-unknown-unknown
105
-
106
- fmt :
107
- name : Cargo fmt
108
- runs-on : ubuntu-latest
109
- steps :
110
- - name : Checkout sources
111
- uses : actions/checkout@v4
112
-
113
- - name : Install Rust nightly toolchain
114
- uses : actions-rs/toolchain@v1
115
- with :
116
- profile : minimal
117
- toolchain : stable
118
- override : true
119
- components : rustfmt
120
-
121
- - name : Rust Cache
122
- uses : Swatinem/rust-cache@3cf7f8cc28d1b4e7d01e3783be10a97d55d483c8 # v2.7.1
123
-
124
- - name : Cargo fmt
125
- uses :
actions-rs/[email protected]
126
- with :
127
- command : fmt
128
- args : --all -- --check
129
-
130
- docs :
131
- name : Check documentation and run doc tests
132
- runs-on : ubuntu-latest
133
- steps :
134
- - name : Checkout sources
135
- uses : actions/checkout@v4
136
-
137
- - name : Use substrate-node binary
138
- uses : ./.github/workflows/actions/use-substrate
139
-
140
- - name : Install Rust stable toolchain
141
- uses : actions-rs/toolchain@v1
142
- with :
143
- profile : minimal
144
- toolchain : stable
145
- override : true
146
-
147
- - name : Rust Cache
148
- uses : Swatinem/rust-cache@3cf7f8cc28d1b4e7d01e3783be10a97d55d483c8 # v2.7.1
149
-
150
- - name : Check internal documentation links
151
- run : RUSTDOCFLAGS="--deny rustdoc::broken_intra_doc_links" cargo doc -vv --workspace --no-deps --document-private-items
152
-
153
- - name : Run cargo test on documentation
154
- uses :
actions-rs/[email protected]
155
- with :
156
- command : test
157
- args : --doc
158
-
159
- tests :
160
- name : " Test (Native)"
161
- runs-on : ubuntu-latest-16-cores
162
- steps :
163
- - name : Checkout sources
164
- uses : actions/checkout@v4
165
-
166
- - name : Use substrate-node binary
167
- uses : ./.github/workflows/actions/use-substrate
168
-
169
- - name : Install Rust stable toolchain
170
- uses : actions-rs/toolchain@v1
171
- with :
172
- profile : minimal
173
- toolchain : stable
174
- override : true
175
-
176
- - name : Rust Cache
177
- uses : Swatinem/rust-cache@3cf7f8cc28d1b4e7d01e3783be10a97d55d483c8 # v2.7.1
178
-
179
- - name : Install cargo-nextest
180
- run : cargo install cargo-nextest
181
-
182
- - name : Run tests
183
- uses :
actions-rs/[email protected]
184
- with :
185
- command : nextest
186
- args : run --workspace
187
-
188
26
unstable_backend_tests :
189
27
name : " Test (Unstable Backend)"
190
28
runs-on : ubuntu-latest-16-cores
@@ -202,146 +40,5 @@ jobs:
202
40
toolchain : stable
203
41
override : true
204
42
205
- - name : Rust Cache
206
- uses : Swatinem/rust-cache@3cf7f8cc28d1b4e7d01e3783be10a97d55d483c8 # v2.7.1
207
-
208
- - name : Install cargo-nextest
209
- run : cargo install cargo-nextest
210
-
211
- - name : Run tests
212
- uses :
actions-rs/[email protected]
213
- with :
214
- command : nextest
215
- args : run --workspace --features unstable-backend-client
216
-
217
- light_client_tests :
218
- name : " Test (Light Client)"
219
- runs-on : ubuntu-latest-16-cores
220
- timeout-minutes : 25
221
- steps :
222
- - name : Checkout sources
223
- uses : actions/checkout@v4
224
-
225
- - name : Use substrate-node binary
226
- uses : ./.github/workflows/actions/use-substrate
227
-
228
- - name : Install Rust stable toolchain
229
- uses : actions-rs/toolchain@v1
230
- with :
231
- profile : minimal
232
- toolchain : stable
233
- override : true
234
-
235
- - name : Rust Cache
236
- uses : Swatinem/rust-cache@3cf7f8cc28d1b4e7d01e3783be10a97d55d483c8 # v2.7.1
237
-
238
- - name : Run tests
239
- uses :
actions-rs/[email protected]
240
- with :
241
- command : test
242
- args : --release --package integration-tests --features unstable-light-client
243
-
244
- wasm_tests :
245
- name : Test (WASM)
246
- runs-on : ubuntu-latest
247
- env :
248
- # Set timeout for wasm tests to be much bigger than the default 20 secs.
249
- WASM_BINDGEN_TEST_TIMEOUT : 300
250
-
251
- steps :
252
- - uses : actions/checkout@v4
253
-
254
- - name : Install wasm-pack
255
- run : curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
256
-
257
- - name : Install firefox
258
- uses : browser-actions/setup-firefox@latest
259
-
260
- - name : Install chrome
261
- uses : browser-actions/setup-chrome@latest
262
-
263
- - name : Rust Cache
264
- uses : Swatinem/rust-cache@3cf7f8cc28d1b4e7d01e3783be10a97d55d483c8 # v2.7.1
265
-
266
- - name : Use substrate-node binary
267
- uses : ./.github/workflows/actions/use-substrate
268
-
269
- - name : Run subxt WASM tests
270
- run : |
271
- # `listen-addr` is used to configure p2p to accept websocket connections instead of TCP.
272
- # `node-key` provides a deterministic p2p address.
273
- substrate-node --dev --node-key 0000000000000000000000000000000000000000000000000000000000000001 --listen-addr /ip4/0.0.0.0/tcp/30333/ws > /dev/null 2>&1 &
274
- wasm-pack test --headless --firefox
275
- wasm-pack test --headless --chrome
276
- pkill substrate-node
277
- working-directory : testing/wasm-rpc-tests
278
-
279
- - name : Run subxt-lightclient WASM tests
280
- run : |
281
- # `listen-addr` is used to configure p2p to accept websocket connections instead of TCP.
282
- # `node-key` provides a deterministic p2p address.
283
- substrate-node --dev --node-key 0000000000000000000000000000000000000000000000000000000000000001 --listen-addr /ip4/0.0.0.0/tcp/30333/ws > /dev/null 2>&1 &
284
- wasm-pack test --headless --firefox
285
- wasm-pack test --headless --chrome
286
- pkill substrate-node
287
- working-directory : testing/wasm-lightclient-tests
288
-
289
- - name : Run subxt-signer WASM tests
290
- run : |
291
- wasm-pack test --headless --firefox
292
- wasm-pack test --headless --chrome
293
- working-directory : signer/wasm-tests
294
-
295
- clippy :
296
- name : Cargo clippy
297
- runs-on : ubuntu-latest
298
- steps :
299
- - name : Checkout sources
300
- uses : actions/checkout@v4
301
-
302
- - name : Use substrate-node binary
303
- uses : ./.github/workflows/actions/use-substrate
304
-
305
- - name : Install Rust stable toolchain
306
- uses : actions-rs/toolchain@v1
307
- with :
308
- profile : minimal
309
- toolchain : stable
310
- components : clippy
311
- override : true
312
-
313
- - name : Rust Cache
314
- uses : Swatinem/rust-cache@3cf7f8cc28d1b4e7d01e3783be10a97d55d483c8 # v2.7.1
315
-
316
- - name : Run clippy
317
- uses : actions-rs/cargo@v1
318
- with :
319
- command : clippy
320
- args : --all-targets -- -D warnings
321
- machete :
322
- name : " Check unused dependencies"
323
- runs-on : ubuntu-latest
324
- steps :
325
- - name : Checkout sources
326
- uses : actions/checkout@v4
327
-
328
- - name : Use substrate-node binary
329
- uses : ./.github/workflows/actions/use-substrate
330
-
331
- - name : Install Rust stable toolchain
332
- uses : actions-rs/toolchain@v1
333
- with :
334
- profile : minimal
335
- toolchain : stable
336
- override : true
337
-
338
- - name : Rust Cache
339
- uses : Swatinem/rust-cache@3cf7f8cc28d1b4e7d01e3783be10a97d55d483c8 # v2.7.1
340
-
341
- - name : Install cargo-machete
342
- run : cargo install cargo-machete
343
-
344
- - name : Check unused dependencies
345
- uses :
actions-rs/[email protected]
346
- with :
347
- command : machete
43
+ - name : test
44
+ - run : cargo test -p integration-tests --features unstable-backend-client -- submit_large_extrinsic --nocapture
0 commit comments