|
6 | 6 | - "ironfish-phase2/**"
|
7 | 7 | - "ironfish-rust/**"
|
8 | 8 | - "ironfish-rust-nodejs/**"
|
| 9 | + - "ironfish-rust-wasm/**" |
9 | 10 | - "ironfish-zkp/**"
|
10 | 11 | - "rust-toolchain"
|
11 | 12 | - ".github/workflows/rust*"
|
|
20 | 21 | - "ironfish-phase2/**"
|
21 | 22 | - "ironfish-rust/**"
|
22 | 23 | - "ironfish-rust-nodejs/**"
|
| 24 | + - "ironfish-rust-wasm/**" |
23 | 25 | - "ironfish-zkp/**"
|
24 | 26 | - "rust-toolchain"
|
25 | 27 | - ".github/workflows/rust*"
|
@@ -48,11 +50,14 @@ jobs:
|
48 | 50 | - name: Check for license headers for ironfish-rust-nodejs
|
49 | 51 | run: ./ci/lintHeaders.sh ./ironfish-rust-nodejs/src *.rs
|
50 | 52 |
|
51 |
| - - name: "`cargo fmt` check on ironfish-rust" |
| 53 | + - name: Check for license headers for ironfish-rust-wasm |
| 54 | + run: ./ci/lintHeaders.sh ./ironfish-rust-wasm/src *.rs |
| 55 | + |
| 56 | + - name: cargo fmt |
52 | 57 | run: |
|
53 | 58 | cargo fmt --all -- --check
|
54 | 59 |
|
55 |
| - - name: "Clippy check on ironfish-rust" |
| 60 | + - name: cargo clippy |
56 | 61 | run: |
|
57 | 62 | cargo clippy --all-targets --all-features -- -D warnings
|
58 | 63 |
|
@@ -220,3 +225,29 @@ jobs:
|
220 | 225 | with:
|
221 | 226 | token: ${{secrets.CODECOV_TOKEN}}
|
222 | 227 | flags: ironfish-zkp
|
| 228 | + |
| 229 | + ironfish_wasm: |
| 230 | + name: Test ironfish-rust-wasm |
| 231 | + runs-on: ubuntu-latest |
| 232 | + steps: |
| 233 | + - uses: actions/checkout@v4 |
| 234 | + |
| 235 | + - name: Cache Rust |
| 236 | + uses: Swatinem/rust-cache@v2 |
| 237 | + with: |
| 238 | + shared-key: wasm |
| 239 | + |
| 240 | + - name: Install wasm-pack |
| 241 | + # use the installation method reccommended on |
| 242 | + # https://rustwasm.github.io/docs/wasm-bindgen/wasm-bindgen-test/continuous-integration.html#github-actions |
| 243 | + run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh |
| 244 | + |
| 245 | + - name: Run tests in Firefox |
| 246 | + run: | |
| 247 | + cd ironfish-rust-wasm |
| 248 | + wasm-pack test --headless --firefox |
| 249 | +
|
| 250 | + - name: Run tests in Chrome |
| 251 | + run: | |
| 252 | + cd ironfish-rust-wasm |
| 253 | + wasm-pack test --headless --chrome |
0 commit comments