Skip to content

Commit

Permalink
Split test_examples and test_nightly
Browse files Browse the repository at this point in the history
  • Loading branch information
Systemcluster committed Aug 8, 2024
1 parent df0feff commit 879d25c
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 3 deletions.
14 changes: 12 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -401,20 +401,30 @@ jobs:
test_examples:
needs:
- build_examples
- build_nightly
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: examples1
path: exbuild
- run: rustup update --no-self-update stable && rustup default stable
- run: cargo test -p example-tests
env:
EXBUILD: ${{ github.workspace }}/exbuild

test_nightly:
needs:
- build_nightly
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: examples2
path: exbuild
- run: rustup update --no-self-update stable && rustup default stable
- run: cargo test -p example-tests
- run: cargo test -p example-tests --no-default-features --features nightly
env:
EXBUILD: ${{ github.workspace }}/exbuild

Expand Down
12 changes: 11 additions & 1 deletion crates/example-tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,22 @@ authors = ["The wasm-bindgen Developers"]
edition = "2021"
publish = false

[features]
default = ["stable"]
stable = []
nightly = []

[dependencies]
anyhow = "1.0.75"
futures-util = { version = "0.3.28", features = ["sink"] }
http = "1"
hyper = "1"
hyper-util = { version = "0.1.6", features = ["http1", "service", "server", "tokio"] }
hyper-util = { version = "0.1.6", features = [
"http1",
"service",
"server",
"tokio",
] }
mozprofile = "0.9"
mozrunner = "0.15"
serde = { version = "1.0", features = ["derive"] }
Expand Down
8 changes: 8 additions & 0 deletions crates/example-tests/tests/shell.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,21 @@ macro_rules! shell_tests {

shell_tests! {
#["RUSTUP_TOOLCHAIN" = "nightly"]
#[cfg(feature = "nightly")]
raytrace_parallel = "raytrace-parallel",
#[cfg(feature = "stable")]
synchronous_instantiation = "synchronous-instantiation",
#[cfg(feature = "stable")]
wasm2js = "wasm2js",
#["RUSTUP_TOOLCHAIN" = "nightly"]
#[cfg(feature = "nightly")]
wasm_audio_worklet = "wasm-audio-worklet",
#[cfg(feature = "stable")]
wasm_in_web_worker = "wasm-in-web-worker",
#[cfg(feature = "stable")]
websockets = "websockets",
#[cfg(feature = "stable")]
without_a_bundler = "without-a-bundler",
#[cfg(feature = "stable")]
without_a_bundler_no_modules = "without-a-bundler-no-modules",
}

0 comments on commit 879d25c

Please sign in to comment.