From bf1366176d41a264faf42f11f6b288a57be268ed Mon Sep 17 00:00:00 2001 From: Simon Bourne Date: Fri, 20 Oct 2023 20:31:43 +0100 Subject: [PATCH] Limit SSE test events to 10 and enable release tests --- .github/workflows/ci-tests.yml | 39 ++++++++++++++++++++++++++++++++++ packages/test/src/server.rs | 2 +- packages/xtask/src/main.rs | 9 ++++++++ 3 files changed, 49 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-tests.yml b/.github/workflows/ci-tests.yml index c2b19a3..65a26af 100644 --- a/.github/workflows/ci-tests.yml +++ b/.github/workflows/ci-tests.yml @@ -21,6 +21,19 @@ jobs: - run: cargo test - run: cargo build --all-targets - run: cargo doc + release-tests-ubuntu-latest: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: ructions/toolchain@v2 + with: + toolchain: 1.73 + profile: minimal + default: true + targets: wasm32-unknown-unknown + - uses: Swatinem/rust-cache@v2 + - run: cargo install wasm-pack --locked --version 0.12.1 + - run: cargo test --benches --tests --release tests-macos-latest: runs-on: macos-latest steps: @@ -39,6 +52,19 @@ jobs: - run: cargo test - run: cargo build --all-targets - run: cargo doc + release-tests-macos-latest: + runs-on: macos-latest + steps: + - uses: actions/checkout@v3 + - uses: ructions/toolchain@v2 + with: + toolchain: 1.73 + profile: minimal + default: true + targets: wasm32-unknown-unknown + - uses: Swatinem/rust-cache@v2 + - run: cargo install wasm-pack --locked --version 0.12.1 + - run: cargo test --benches --tests --release tests-windows-latest: runs-on: windows-latest steps: @@ -57,6 +83,19 @@ jobs: - run: cargo test - run: cargo build --all-targets - run: cargo doc + release-tests-windows-latest: + runs-on: windows-latest + steps: + - uses: actions/checkout@v3 + - uses: ructions/toolchain@v2 + with: + toolchain: 1.73 + profile: minimal + default: true + targets: wasm32-unknown-unknown + - uses: Swatinem/rust-cache@v2 + - run: cargo install wasm-pack --locked --version 0.12.1 + - run: cargo test --benches --tests --release lints-ubuntu-latest: runs-on: ubuntu-latest steps: diff --git a/packages/test/src/server.rs b/packages/test/src/server.rs index fb95739..96a92ed 100644 --- a/packages/test/src/server.rs +++ b/packages/test/src/server.rs @@ -24,7 +24,7 @@ pub async fn try_multiply(args: TryMultiply) -> Result { } fn sse_stream() -> impl Stream> { - stream::iter((0..).map(|i| Ok(Counter(i)))) + stream::iter((0..10).map(|i| Ok(Counter(i)))) } fn counter(_updates: BoxStream<'static, ()>, args: Counter) -> ((), impl Stream) { diff --git a/packages/xtask/src/main.rs b/packages/xtask/src/main.rs index c0ee7ef..77ed2bb 100644 --- a/packages/xtask/src/main.rs +++ b/packages/xtask/src/main.rs @@ -22,6 +22,15 @@ fn ci() -> CI { .step(install("wasm-pack", "0.12.1")) .tests(), ); + workflow.add_job( + Tasks::new( + "release-tests", + platform, + rust_toolchain("1.73").minimal().default().wasm(), + ) + .step(install("wasm-pack", "0.12.1")) + .release_tests(), + ); } workflow.standard_lints("nightly-2023-10-14", "0.1.43")