Skip to content

Merge pull request #15 from omnia-network/chore/bump-version #94

Merge pull request #15 from omnia-network/chore/bump-version

Merge pull request #15 from omnia-network/chore/bump-version #94

Workflow file for this run

name: ic-websocket-cdk-rs tests
on:
push:
branches:
- main
pull_request:
jobs:
unit-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: "stable"
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: "true"
- name: Run unit tests
run: cargo test --package ic-websocket-cdk --lib -- tests::unit_tests
- name: Run doc tests
run: cargo test --package ic-websocket-cdk --doc
integration-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: "stable"
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: "true"
# the following steps are replicated in the scripts/test.sh file
- name: Prepare environment for integration tests
run: |
rustup target add wasm32-unknown-unknown
./scripts/download-pocket-ic.sh
./scripts/build-test-canister.sh
- name: Run integration tests
run: POCKET_IC_MUTE_SERVER=1 POCKET_IC_BIN="$(pwd)/bin/pocket-ic" cargo test --package ic-websocket-cdk --lib -- tests::integration_tests --test-threads 1