Skip to content

Commit

Permalink
Use cargo-nextest in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
daxpedda committed Dec 17, 2024
1 parent 964f5e9 commit a0cadc5
Showing 1 changed file with 54 additions and 27 deletions.
81 changes: 54 additions & 27 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,12 +142,12 @@ jobs:
runs:
- name: "wasm-bindgen"
run: |
cargo test --target wasm32-unknown-unknown
cargo test --target wasm32-unknown-unknown -p wasm-bindgen-futures
cargo nextest run --target wasm32-unknown-unknown
cargo nextest run --target wasm32-unknown-unknown -p wasm-bindgen-futures
- name: "wasm-bindgen (serde-serialize)"
run: cargo test --target wasm32-unknown-unknown --features serde-serialize
run: cargo nextest run --target wasm32-unknown-unknown --features serde-serialize
- name: "wasm-bindgen (enable-interning)"
run: cargo test --target wasm32-unknown-unknown --features enable-interning
run: cargo nextest run --target wasm32-unknown-unknown --features enable-interning
name: "Run wasm-bindgen crate tests (${{ matrix.runs.name }})"
runs-on: ubuntu-latest
env:
Expand All @@ -160,6 +160,9 @@ jobs:
with:
node-version: '20'
- uses: ./.github/actions/setup-geckodriver
- uses: taiki-e/install-action@v2
with:
tool: cargo-nextest
- run: ${{ matrix.runs.run }}

test_wasm_bindgen_wasm:
Expand All @@ -174,7 +177,10 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: '20'
- run: cargo test --target wasm32-unknown-unknown --test wasm
- uses: taiki-e/install-action@v2
with:
tool: cargo-nextest
- run: cargo nextest run --target wasm32-unknown-unknown --test wasm
env:
WASM_BINDGEN_NO_DEBUG: 1

Expand All @@ -201,7 +207,10 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: '20'
- run: cargo test --target wasm32-unknown-unknown
- uses: taiki-e/install-action@v2
with:
tool: cargo-nextest
- run: cargo nextest run --target wasm32-unknown-unknown

test_threads:
name: "Run wasm-bindgen crate tests with multithreading"
Expand All @@ -213,9 +222,12 @@ jobs:
- run: rustup default nightly-2024-07-06
- run: rustup target add wasm32-unknown-unknown
- run: rustup component add rust-src
- uses: taiki-e/install-action@v2
with:
tool: cargo-nextest
- run: |
RUSTFLAGS='-C target-feature=+atomics,+bulk-memory,+mutable-globals' \
cargo test --target wasm32-unknown-unknown -Z build-std=std,panic_abort
cargo nextest run --target wasm32-unknown-unknown -Z build-std=std,panic_abort
# I don't know why this is failing so comment this out for now, but ideally
# this would be figured out at some point and solved.
Expand Down Expand Up @@ -266,15 +278,18 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: '20'
- run: cargo test
- run: cargo test -p wasm-bindgen-cli-support
- run: cargo test -p wasm-bindgen-cli
- run: cargo test -p wasm-bindgen-externref-xform
- run: cargo test -p wasm-bindgen-macro-support
- run: cargo test -p wasm-bindgen-multi-value-xform
- run: cargo test -p wasm-bindgen-wasm-interpreter
- run: cargo test -p wasm-bindgen-futures
- run: cargo test -p wasm-bindgen-shared
- uses: taiki-e/install-action@v2
with:
tool: cargo-nextest
- run: cargo nextest run
- run: cargo nextest run -p wasm-bindgen-cli-support
- run: cargo nextest run -p wasm-bindgen-cli
- run: cargo nextest run -p wasm-bindgen-externref-xform
- run: cargo nextest run -p wasm-bindgen-macro-support
- run: cargo nextest run -p wasm-bindgen-multi-value-xform
- run: cargo nextest run -p wasm-bindgen-wasm-interpreter
- run: cargo nextest run -p wasm-bindgen-futures
- run: cargo nextest run -p wasm-bindgen-shared

test_with_geckodriver:
strategy:
Expand All @@ -287,25 +302,25 @@ jobs:
cargo build --manifest-path crates/web-sys/Cargo.toml --target wasm32-unknown-unknown --features Element
cargo build --manifest-path crates/web-sys/Cargo.toml --target wasm32-unknown-unknown --features Window
- name: "web-sys (all features)"
run: cargo test --manifest-path crates/web-sys/Cargo.toml --target wasm32-unknown-unknown --all-features
run: cargo nextest run --manifest-path crates/web-sys/Cargo.toml --target wasm32-unknown-unknown --all-features
- name: "web-sys (unstable, all features)"
run: cargo test --manifest-path crates/web-sys/Cargo.toml --target wasm32-unknown-unknown --all-features
run: cargo nextest run --manifest-path crates/web-sys/Cargo.toml --target wasm32-unknown-unknown --all-features
env:
RUSTFLAGS: --cfg=web_sys_unstable_apis
- name: "js-sys"
run: cargo test -p js-sys --target wasm32-unknown-unknown
run: cargo nextest run -p js-sys --target wasm32-unknown-unknown
- name: "js-sys (unstable)"
run: cargo test -p js-sys --target wasm32-unknown-unknown
run: cargo nextest run -p js-sys --target wasm32-unknown-unknown
env:
RUSTFLAGS: --cfg=js_sys_unstable_apis
- name: "wasm-bindgen-webidl"
run: cargo test -p wasm-bindgen-webidl
run: cargo nextest run -p wasm-bindgen-webidl
- name: "webidl-tests"
run: cargo test -p webidl-tests --target wasm32-unknown-unknown
run: cargo nextest run -p webidl-tests --target wasm32-unknown-unknown
env:
WBINDGEN_I_PROMISE_JS_SYNTAX_WORKS_IN_NODE: 1
- name: "webidl-tests (unstable)"
run: cargo test -p webidl-tests --target wasm32-unknown-unknown
run: cargo nextest run -p webidl-tests --target wasm32-unknown-unknown
env:
RUSTFLAGS: --cfg=web_sys_unstable_apis
- name: "typescript-tests"
Expand All @@ -323,6 +338,9 @@ jobs:
with:
node-version: '20'
- uses: ./.github/actions/setup-geckodriver
- uses: taiki-e/install-action@v2
with:
tool: cargo-nextest
- run: ${{ matrix.runs.run }}

test_deno:
Expand All @@ -343,8 +361,11 @@ jobs:
steps:
- uses: actions/checkout@v4
- run: rustup update --no-self-update 1.78.0 && rustup default 1.78.0
- run: cargo test -p wasm-bindgen-macro
- run: cargo test -p wasm-bindgen-test-macro
- uses: taiki-e/install-action@v2
with:
tool: cargo-nextest
- run: cargo nextest run -p wasm-bindgen-macro
- run: cargo nextest run -p wasm-bindgen-test-macro

build_webidl:
name: "Verify that web-sys is compiled correctly"
Expand Down Expand Up @@ -417,7 +438,10 @@ jobs:
name: examples1
path: exbuild
- run: rustup update --no-self-update stable && rustup default stable
- run: cargo test -p example-tests
- uses: taiki-e/install-action@v2
with:
tool: cargo-nextest
- run: cargo nextest run -p example-tests
env:
EXBUILD: ${{ github.workspace }}/exbuild

Expand All @@ -432,7 +456,10 @@ jobs:
name: examples2
path: exbuild
- run: rustup update --no-self-update stable && rustup default stable
- run: cargo test -p example-tests --no-default-features --features nightly
- uses: taiki-e/install-action@v2
with:
tool: cargo-nextest
- run: cargo nextest run -p example-tests --no-default-features --features nightly
env:
EXBUILD: ${{ github.workspace }}/exbuild

Expand Down

0 comments on commit a0cadc5

Please sign in to comment.