Skip to content

Commit 04f830f

Browse files
daxpeddajosephlr
andcommitted
Improve CI test matrix
Co-Authored-By: Joe Richey <[email protected]>
1 parent b2ab9a1 commit 04f830f

File tree

1 file changed

+22
-17
lines changed

1 file changed

+22
-17
lines changed

.github/workflows/tests.yml

+22-17
Original file line numberDiff line numberDiff line change
@@ -229,19 +229,24 @@ jobs:
229229
# run: cargo test
230230

231231
web:
232-
name: Web ${{ matrix.rust.description }}
232+
name: ${{ matrix.rust.description }}
233233
runs-on: ubuntu-24.04
234234
strategy:
235235
fail-fast: false
236236
matrix:
237237
rust:
238-
- { version: stable }
239238
- {
240-
description: with Atomics,
239+
description: Web,
240+
version: stable,
241+
flags: -Dwarnings --cfg getrandom_backend="wasm_js",
242+
args: --features=std,
243+
}
244+
- {
245+
description: Web with Atomics,
241246
version: nightly,
242247
components: rust-src,
243-
flags: '-Ctarget-feature=+atomics,+bulk-memory',
244-
args: '-Zbuild-std=panic_abort,std',
248+
flags: '-Dwarnings --cfg getrandom_backend="wasm_js" -Ctarget-feature=+atomics,+bulk-memory',
249+
args: '--features=std -Zbuild-std=panic_abort,std',
245250
}
246251
steps:
247252
- uses: actions/checkout@v4
@@ -259,34 +264,34 @@ jobs:
259264
- uses: Swatinem/rust-cache@v2
260265
- name: Test (Node)
261266
env:
262-
RUSTFLAGS: -Dwarnings --cfg getrandom_backend="wasm_js" ${{ matrix.rust.flags }}
263-
run: wasm-pack test --node -- --features std ${{ matrix.rust.args }}
267+
RUSTFLAGS: ${{ matrix.rust.flags }}
268+
run: wasm-pack test --node -- ${{ matrix.rust.args }}
264269
- name: Test (Firefox)
265270
env:
266271
WASM_BINDGEN_USE_BROWSER: 1
267-
RUSTFLAGS: -Dwarnings --cfg getrandom_backend="wasm_js" ${{ matrix.rust.flags }}
268-
run: wasm-pack test --headless --firefox -- --features std ${{ matrix.rust.args }}
272+
RUSTFLAGS: ${{ matrix.rust.flags }}
273+
run: wasm-pack test --headless --firefox -- ${{ matrix.rust.args }}
269274
- name: Test (Chrome)
270275
env:
271276
WASM_BINDGEN_USE_BROWSER: 1
272-
RUSTFLAGS: -Dwarnings --cfg getrandom_backend="wasm_js" ${{ matrix.rust.flags }}
273-
run: wasm-pack test --headless --chrome -- --features std ${{ matrix.rust.args }}
277+
RUSTFLAGS: ${{ matrix.rust.flags }}
278+
run: wasm-pack test --headless --chrome -- ${{ matrix.rust.args }}
274279
- name: Test (dedicated worker)
275280
env:
276281
WASM_BINDGEN_USE_DEDICATED_WORKER: 1
277-
RUSTFLAGS: -Dwarnings --cfg getrandom_backend="wasm_js" ${{ matrix.rust.flags }}
278-
run: wasm-pack test --headless --firefox -- --features std ${{ matrix.rust.args }}
282+
RUSTFLAGS: ${{ matrix.rust.flags }}
283+
run: wasm-pack test --headless --firefox -- ${{ matrix.rust.args }}
279284
- name: Test (shared worker)
280285
env:
281286
WASM_BINDGEN_USE_SHARED_WORKER: 1
282-
RUSTFLAGS: -Dwarnings --cfg getrandom_backend="wasm_js" ${{ matrix.rust.flags }}
283-
run: wasm-pack test --headless --firefox -- --features std ${{ matrix.rust.args }}
287+
RUSTFLAGS: ${{ matrix.rust.flags }}
288+
run: wasm-pack test --headless --firefox -- ${{ matrix.rust.args }}
284289
- name: Test (service worker)
285290
env:
286291
WASM_BINDGEN_USE_SERVICE_WORKER: 1
287-
RUSTFLAGS: -Dwarnings --cfg getrandom_backend="wasm_js" ${{ matrix.rust.flags }}
292+
RUSTFLAGS: ${{ matrix.rust.flags }}
288293
# Firefox doesn't support module service workers and therefor can't import scripts
289-
run: wasm-pack test --headless --chrome -- --features std ${{ matrix.rust.args }}
294+
run: wasm-pack test --headless --chrome -- ${{ matrix.rust.args }}
290295

291296
wasi:
292297
name: WASI

0 commit comments

Comments
 (0)