Skip to content

Merge pull request #2 from omnia-network/chore/migrate-tests-to-pocke… #27

Merge pull request #2 from omnia-network/chore/migrate-tests-to-pocke…

Merge pull request #2 from omnia-network/chore/migrate-tests-to-pocke… #27

Workflow file for this run

name: ic-websocket-cdk-rs tests
# only run when a commit is pushed to the main branch
on:
push:
branches:
- main
jobs:
unit-and-integration-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- 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 -p ic-websocket-cdk
- 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_BIN="$(pwd)/bin/pocket-ic" cargo test --package ic-websocket-cdk --lib -- tests::integration_tests --test-threads 1