Skip to content

Commit

Permalink
Simplify / optimize unit tests wf run
Browse files Browse the repository at this point in the history
  • Loading branch information
Mauro Lacy committed Aug 6, 2024
1 parent d426451 commit c8b44e2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 17 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ jobs:
build_and_upload_contracts:
defaults:
run:
working-directory: "/__w"
working-directory: "/__w/babylon-contract/babylon-contract"
runs-on: ubuntu-latest
container:
image: rust:1.78.0
steps:
- uses: actions/checkout@v4.1.0
with:
path: "/__w"
path: "/__w/babylon-contract/babylon-contract"
- name: Make temporary bin
run: mkdir -p /tmp/bin
- name: Install ghr
Expand All @@ -32,9 +32,9 @@ jobs:
- uses: actions/upload-artifact@v4.1.0
with:
path: |-
/__w/artifacts/babylon_contract.wasm
/__w/artifacts/btc_staking.wasm
/__w/artifacts/checksums.txt
/__w/babylon-contract/babylon-contract/artifacts/babylon_contract.wasm
/__w/babylon-contract/babylon-contract/artifacts/btc_staking.wasm
/__w/babylon-contract/babylon-contract/artifacts/checksums.txt
- name: Show data
run: |-
ls -l artifacts
Expand All @@ -53,14 +53,14 @@ jobs:
build_and_upload_schemas:
defaults:
run:
working-directory: "/__w"
working-directory: "/__w/babylon-contract/babylon-contract"
runs-on: ubuntu-latest
container:
image: rust:1.78.0
steps:
- uses: actions/checkout@v4.1.0
with:
path: "/__w"
path: "/__w/babylon-contract/babylon-contract"
- name: Make temporary bin
run: mkdir -p /tmp/bin
- name: Install ghr
Expand Down
10 changes: 1 addition & 9 deletions .github/workflows/local-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,5 @@ jobs:
image: rust:1.78.0
steps:
- uses: actions/checkout@v4.1.0
- name: Set up Rust environment
run: rustup component add rustfmt clippy
- name: Build Babylon contracts
run: cargo build
- name: Test generating schema
run: |-
(cd ./contracts/babylon && cargo run --bin schema)
(cd ./contracts/btc-staking && cargo run --bin btcstaking-schema)
- name: Check formats and run unit tests
- name: Build contracts, check formats, and run unit tests
run: cargo test --lib
2 changes: 1 addition & 1 deletion .github/workflows/wasm-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Install cosmwasm-check
run: cargo install --locked --debug --version ^2.0 cosmwasm-check
- name: Check the Wasm binaries' validity
run: cosmwasm-check /__w/artifacts/*.wasm
run: cosmwasm-check /__w/babylon-contract/babylon-contract/artifacts/*.wasm
- name: Integration tests based on CosmWasm
run: cargo test --test integration
- uses: actions/upload-artifact@v4.1.0
Expand Down

0 comments on commit c8b44e2

Please sign in to comment.