Skip to content

Commit ec9b368

Browse files
committed
fix: add wasm tests as a separate job
1 parent 7df99ff commit ec9b368

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

.github/workflows/rust-test.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,34 @@ jobs:
4646
- name: Test
4747
run: cargo test --workspace --all-features
4848

49+
test-wasm:
50+
name: WASM
51+
runs-on: ubuntu-24.04
52+
53+
steps:
54+
- name: Checkout
55+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
56+
57+
- name: Set Rust Toolchain
58+
id: toolchain
59+
shell: bash
60+
run: |
61+
RUST_TOOLCHAIN="$(grep -oP '^channel.*"(\K.*?)(?=")' rust-toolchain.toml)"
62+
echo "RUST_TOOLCHAIN=${RUST_TOOLCHAIN}" | tee -a "${GITHUB_OUTPUT}"
63+
64+
- name: Install rust
65+
uses: dtolnay/rust-toolchain@56f84321dbccf38fb67ce29ab63e4754056677e0 # stable
66+
with:
67+
toolchain: "${{ steps.toolchain.outputs.RUST_TOOLCHAIN }}"
68+
targets: wasm32-unknown-unknown
69+
components: rust-src
70+
71+
- name: Cache cargo registry
72+
uses: Swatinem/rust-cache@f0deed1e0edfc6a9be95417288c0e1099b1eeec3 # v2.7.7
73+
74+
- name: Install wasm-bindgen-cli
75+
run: cargo install wasm-bindgen-cli --version 0.2.100
76+
4977
- name: Test WASM
5078
run: cargo test --target wasm32-unknown-unknown -p bitwarden-threading -p bitwarden-error --all-features
5179

0 commit comments

Comments
 (0)