Skip to content

Commit 1f20bfd

Browse files
committed
Run ledger tests in wasm
1 parent 1d3d155 commit 1f20bfd

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

.github/workflows/ci.yaml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,42 @@ jobs:
4343
cd ledger
4444
cargo test --release -- -Z unstable-options --report-time
4545
46+
ledger-wasm-tests:
47+
strategy:
48+
fail-fast: false
49+
matrix:
50+
driver:
51+
## FIXME: Activate chrome, but now it timeouts when tests run more than 10 minutes
52+
## Timeout example: https://github.com/openmina/ledger/actions/runs/5245920744/jobs/9474043794
53+
# - --chrome
54+
- --firefox
55+
# - --node -- --features in_nodejs -Z build-std=std,panic_abort
56+
runs-on: ubuntu-latest
57+
env:
58+
RUSTFLAGS: "-C target-feature=+atomics,+bulk-memory,+mutable-globals -C link-arg=--max-memory=4294967296"
59+
RUST_LOG: wasm_bindgen_test_runner
60+
RUST_BACKTRACE: full
61+
CARGO_PROFILE_RELEASE_OVERFLOW_CHECKS: true
62+
CARGO_PROFILE_RELEASE_DEBUG_ASSERTIONS: true
63+
CARGO_PROFILE_RELEASE_DEBUG: true
64+
steps:
65+
- uses: actions/checkout@v3
66+
67+
- name: Install toolchain
68+
uses: actions-rs/toolchain@v1
69+
with:
70+
toolchain: nightly
71+
override: true
72+
profile: minimal
73+
components: rust-src
74+
75+
- name: Install wasm-pack
76+
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
77+
78+
- run: |
79+
cd ledger
80+
wasm-pack test --release ${{ matrix.driver }} --headless -- -Z build-std=std,panic_abort
81+
4682
p2p-tests:
4783
runs-on: ubuntu-20.04
4884
steps:

0 commit comments

Comments
 (0)