Repository navigation
63 lines (52 loc) · 1.74 KB
/
Copy path_tests-wasm.yml
File metadata and controls
63 lines (52 loc) · 1.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# Execute Wasm-specific implementations that cargo-hack only compile-checks.
name: "Tests: Wasm"
on:
workflow_call:
# Set default permissions
permissions:
contents: read
# Set default shell
defaults:
run:
shell: bash
# Set default env vars
env:
RUST_BACKTRACE: full
# Configure concurrency
concurrency:
group: wasm-tests-${{ github.head_ref || github.ref || github.run_id }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
# No caching needed as it runs in parallel with much longer jobs
wasm-tests:
name: Wasm Unit Tests (Node)
runs-on: ubuntu-latest
steps:
# Checkout the code
- name: Checkout the latest code
uses: $/.github/wrappers/checkout
with:
ref: ${{ github.event.pull_request.head.sha || github.ref }}
persist-credentials: false
# Set up the Rust toolchain for the Wasm target.
- name: Setup Rust Toolchain
uses: ./.github/actions/setup-rust-toolchain
with:
target: wasm32-unknown-unknown
- name: Install wasm-pack
# Fail fast if GitHub rate-limits the download instead of retrying
# until the job times out
timeout-minutes: 5
uses: ./.github/actions/install-tool
with:
tools: wasm-pack
# `wasm-pack test --node` runs the built Wasm module under Node.
- name: Setup Node
uses: ./.github/wrappers/setup-node
with:
node-version: 25.x
package-manager-cache: false # cache is not reusable, do not save anything
# Add crates here once they contain `#[wasm_bindgen_test]` tests.
- name: Run Wasm tests (stacks-codec)
working-directory: stacks-codec
run: wasm-pack test --node --features wasm-web