Skip to content

Commit c0744bd

Browse files
author
Mauro Lacy
committed
Add unit and wasm tests
1 parent 881c3ec commit c0744bd

File tree

2 files changed

+43
-0
lines changed

2 files changed

+43
-0
lines changed

.github/workflows/local-tests.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: babylonlabs/op-finality-gadget/local-tests
2+
on:
3+
pull_request:
4+
branches:
5+
- '**'
6+
env:
7+
CARGO_TERM_COLOR: always
8+
jobs:
9+
local-build-test:
10+
runs-on: ubuntu-latest
11+
container:
12+
image: rust:1.78.0
13+
steps:
14+
- uses: actions/[email protected]
15+
- name: Build contracts, check formats, and run unit tests
16+
run: cargo test --lib
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: babylonlabs/op-finality-gadget/wasm-tests-full
2+
on:
3+
pull_request:
4+
branches:
5+
- '**'
6+
env:
7+
CARGO_TERM_COLOR: always
8+
WORKSPACE: "/home/runner/work/op-finality-gadget"
9+
jobs:
10+
wasm-build-check-integration-full:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/[email protected]
14+
- name: Build optimised Wasm binaries
15+
run: "./scripts/optimizer.sh"
16+
- name: List optimised Wasm binaries
17+
run: bash -c "ls $WORKSPACE/artifacts/*.wasm"
18+
- name: Install cosmwasm-check
19+
run: cargo install --locked --debug --version ^2.0 cosmwasm-check
20+
- name: Check the Wasm binaries' validity
21+
run: bash -c "cosmwasm-check $WORKSPACE/artifacts/*.wasm"
22+
- name: Integration tests based on CosmWasm
23+
run: cargo test --test integration
24+
- uses: actions/[email protected]
25+
with:
26+
path: |-
27+
artifacts/op_finality_gadget.wasm

0 commit comments

Comments
 (0)