Add Playwright CI tests for mix-fetch internal-dev harness
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.
This commit is contained in:
@@ -54,6 +54,30 @@ jobs:
|
||||
- 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
|
||||
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
name: nightly-mix-fetch-stress
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 3 * * *'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
stress:
|
||||
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
|
||||
|
||||
- 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-bindgen-cli
|
||||
run: cargo install wasm-bindgen-cli
|
||||
|
||||
- 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 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
|
||||
|
||||
- name: "Stress-test mix-fetch through mainnet"
|
||||
working-directory: wasm/mix-fetch/tests
|
||||
run: npm run test:stress
|
||||
|
||||
- name: Upload Playwright traces on failure
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: mix-fetch-stress-traces
|
||||
path: wasm/mix-fetch/tests/test-results/
|
||||
Reference in New Issue
Block a user