-
Notifications
You must be signed in to change notification settings - Fork 2
53 lines (46 loc) · 1.35 KB
/
tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
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.24.1
# 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