Merge pull request #7 from omnia-network/release/0.4.0 #58
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ic-websocket-cdk-mo tests | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
types: | |
- opened | |
- synchronize | |
- reopened | |
- ready_for_review | |
jobs: | |
test: | |
if: github.event.pull_request.draft == false | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- uses: dfinity/setup-dfx@main | |
with: | |
dfx-version: 0.21.0 | |
# rust toolchain is needed for integration tests | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: "stable" | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
cache-on-failure: "true" | |
- name: Install mops | |
run: npm i ic-mops -g | |
# the following steps are replicated in the scripts/test.sh file | |
- name: Prepare environment for integration tests | |
run: | | |
./scripts/download-pocket-ic.sh | |
./scripts/build-test-canister.sh | |
- name: Run integration tests | |
run: | | |
export POCKET_IC_MUTE_SERVER=1 | |
export POCKET_IC_BIN="$(pwd)/bin/pocket-ic" | |
export TEST_CANISTER_WASM_PATH="$(pwd)/bin/test_canister.wasm" | |
cd tests/ic-websocket-cdk-rs | |
cargo test --package ic-websocket-cdk --lib -- tests::integration_tests --test-threads 1 |