From 80d4adaee549d95701c4ed42c1b844f0306b41af Mon Sep 17 00:00:00 2001 From: Helen Kwok <107752876+helenkwok@users.noreply.github.com> Date: Sat, 19 Sep 2026 14:48:47 +0930 Subject: [PATCH] ci: type-check the web target on pushes to main and on pull requests The web bundle is only built when a release is published, so a desktop-only call in shared code can reach main unnoticed and fail the next release at the wasm step (#1224, #1347). Run cargo check for wasm32-unknown-unknown on the app and the web worker instead. --- .github/workflows/web-check.yml | 34 +++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/web-check.yml diff --git a/.github/workflows/web-check.yml b/.github/workflows/web-check.yml new file mode 100644 index 000000000..d531f09b5 --- /dev/null +++ b/.github/workflows/web-check.yml @@ -0,0 +1,34 @@ +name: Web build check + +# The web bundle is only built when a release is published (pages.yml), so a +# desktop-only call in shared code can sit on main unnoticed until the next +# release fails at the wasm step. Type-check the web target on every change +# instead; this is a check, not a bundle build, so it stays fast. + +on: + push: + branches: [main] + pull_request: + +permissions: + contents: read + +concurrency: + group: web-check-${{ github.ref }} + cancel-in-progress: true + +jobs: + wasm32: + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v4 + + - uses: dtolnay/rust-toolchain@stable + with: + targets: wasm32-unknown-unknown + + - uses: Swatinem/rust-cache@v2 + + # The app and the parse worker that trunk's post-build hook compiles. + - name: cargo check (wasm32) + run: cargo check --locked --target wasm32-unknown-unknown -p OpenCADStudio -p ocs_web_worker