b5d20199a0
Per-PR smoke test (ci-sdk-wasm.yml): loads WASM runtimes and inits MixFetch on Chromium, Firefox, and WebKit. Nightly stress test (nightly-mix-fetch-stress.yml): connects to mainnet via random gateway, runs 10 mixed-size fetches, asserts >= 80% pass.
86 lines
2.3 KiB
YAML
86 lines
2.3 KiB
YAML
name: ci-sdk-wasm
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
pull_request:
|
|
paths:
|
|
- "wasm/**"
|
|
- "clients/client-core/**"
|
|
- "common/**"
|
|
- ".github/workflows/ci-sdk-wasm.yml"
|
|
|
|
jobs:
|
|
wasm:
|
|
runs-on: arc-linux-latest
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
RUSTUP_PERMIT_COPY_RENAME: 1
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
|
|
- uses: actions-rs/toolchain@v1
|
|
with:
|
|
profile: minimal
|
|
toolchain: ${{ vars.REQUIRED_RUSTC_VERSION }}
|
|
target: wasm32-unknown-unknown
|
|
override: true
|
|
components: rustfmt, clippy
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v6
|
|
with:
|
|
go-version: "1.24.6"
|
|
|
|
- name: Install wasm-pack
|
|
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
|
|
|
|
- name: Install wasm-opt
|
|
uses: ./.github/actions/install-wasm-opt
|
|
with:
|
|
version: "116"
|
|
|
|
- name: Install wasm-bindgen-cli
|
|
run: cargo install wasm-bindgen-cli
|
|
|
|
- name: Set debug to false
|
|
run: |
|
|
sed -i.bak 's/\[profile.dev\]/\[profile.dev\]\ndebug = false/' Cargo.toml
|
|
git diff
|
|
|
|
- name: "Build"
|
|
run: make sdk-wasm-build
|
|
|
|
- name: "Build mix-fetch WASM (debug)"
|
|
run: |
|
|
make -C wasm/mix-fetch/go-mix-conn build-debug-dev
|
|
make -C wasm/mix-fetch build-rust-debug
|
|
|
|
- name: "Build mix-fetch internal-dev harness"
|
|
working-directory: wasm/mix-fetch/internal-dev
|
|
run: npm install && npm run build
|
|
|
|
- name: "Install Playwright browsers"
|
|
working-directory: wasm/mix-fetch/tests
|
|
run: npm install && npx playwright install --with-deps # --with-deps assumes Ubuntu/Debian, see note in wasm/mix-fetch/tests/README.md
|
|
|
|
- name: "Smoke-test mix-fetch internal-dev (headless)"
|
|
working-directory: wasm/mix-fetch/tests
|
|
run: npm run test:smoke
|
|
|
|
- name: Upload Playwright traces on failure
|
|
if: failure()
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: mix-fetch-playwright-traces
|
|
path: wasm/mix-fetch/tests/test-results/
|
|
|
|
- name: "Test"
|
|
run: make sdk-wasm-test
|
|
|
|
- name: "Lint"
|
|
run: make sdk-wasm-lint
|