From 5c5c6ec39d89aa69df6be86355cd17f39837e614 Mon Sep 17 00:00:00 2001 From: Kayshen-X Date: Fri, 19 Jun 2026 00:48:04 +0800 Subject: [PATCH] ci(web): run canvaskit host tests --- .github/workflows/rust-check.yml | 2 ++ crates/op-host-web/tests/ci_workflow.rs | 21 +++++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 crates/op-host-web/tests/ci_workflow.rs diff --git a/.github/workflows/rust-check.yml b/.github/workflows/rust-check.yml index 04bb083a4..62c62e28f 100644 --- a/.github/workflows/rust-check.yml +++ b/.github/workflows/rust-check.yml @@ -74,6 +74,8 @@ jobs: # smoke (memory_loop) self-uses the raster fallback instead of # hard-failing on EGL init. Real-GPU coverage runs on dev machines. - run: cargo test --workspace + - name: Run CanvasKit web host tests + run: cargo test -p op-host-web --features canvaskit - run: cargo clippy --workspace --all-targets -- -D warnings # Step 1a Phase C Task 4: spec v19 §11 + §12.3 boundary invariants. # Linux runner has the full mobile target stdlib (`rustup target add` diff --git a/crates/op-host-web/tests/ci_workflow.rs b/crates/op-host-web/tests/ci_workflow.rs new file mode 100644 index 000000000..f9998ec18 --- /dev/null +++ b/crates/op-host-web/tests/ci_workflow.rs @@ -0,0 +1,21 @@ +#[test] +fn rust_check_runs_canvaskit_widget_host_tests() { + let workflow = std::fs::read_to_string(concat!( + env!("CARGO_MANIFEST_DIR"), + "/../../.github/workflows/rust-check.yml" + )) + .expect("rust-check workflow is readable"); + + assert!( + workflow.contains("Run CanvasKit web host tests"), + "rust-check should name the CanvasKit web host test step" + ); + assert!( + workflow.contains("cargo test -p op-host-web"), + "rust-check should run op-host-web tests explicitly" + ); + assert!( + workflow.contains("--features canvaskit"), + "rust-check must enable the production CanvasKit web host feature" + ); +}