12
12
strategy :
13
13
matrix :
14
14
build : [linux-stable]
15
+ pocket-ic : ["replica", "pocketic"]
15
16
include :
16
17
- build : linux-stable
17
18
ic-hs-ref : " 3d71032e"
28
29
- name : Install dfx
29
30
uses : dfinity/setup-dfx@main
30
31
with :
31
- dfx-version : " 0.22.0-beta.0 "
32
+ dfx-version : " 0.24.2 "
32
33
33
34
- name : Cargo cache
34
35
uses : actions/cache@v4
@@ -53,11 +54,20 @@ jobs:
53
54
- name : Run Integration Tests
54
55
run : |
55
56
set -ex
56
- dfx start --background --clean
57
+ if [[ "${{ matrix.pocket-ic }}" == "replica" ]]
58
+ then
59
+ dfx start --background --clean
60
+ else
61
+ dfx start --background --clean --pocketic
62
+ fi
57
63
sleep 1
58
- export IC_REF_PORT=$(dfx info replica -port)
64
+ export IC_REF_PORT=$(dfx info webserver -port)
59
65
export IC_UNIVERSAL_CANISTER_PATH=$HOME/canister.wasm
60
66
export IC_WALLET_CANISTER_PATH=$HOME/wallet.wasm
67
+ if [[ "${{ matrix.pocket-ic }}" == "pocketic" ]]
68
+ then
69
+ export POCKET_IC="http://localhost:${IC_REF_PORT}"
70
+ fi
61
71
cargo test --all-features -- --ignored
62
72
dfx stop
63
73
env :
@@ -79,11 +89,20 @@ jobs:
79
89
# create key:
80
90
pkcs11-tool -k --module $HSM_PKCS11_LIBRARY_PATH --login --slot-index $HSM_SLOT_INDEX -d $HSM_KEY_ID --key-type EC:prime256v1 --pin $HSM_PIN
81
91
82
- dfx start --background --clean
92
+ if [[ "${{ matrix.pocket-ic }}" == "replica" ]]
93
+ then
94
+ dfx start --background --clean
95
+ else
96
+ dfx start --background --clean --pocketic
97
+ fi
83
98
sleep 1
84
- export IC_REF_PORT=$(dfx info replica -port)
99
+ export IC_REF_PORT=$(dfx info webserver -port)
85
100
export IC_UNIVERSAL_CANISTER_PATH=$HOME/canister.wasm
86
101
export IC_WALLET_CANISTER_PATH=$HOME/wallet.wasm
102
+ if [[ "${{ matrix.pocket-ic }}" == "pocketic" ]]
103
+ then
104
+ export POCKET_IC="http://localhost:${IC_REF_PORT}"
105
+ fi
87
106
cd ref-tests
88
107
cargo test --all-features -- --ignored --nocapture --test-threads=1
89
108
dfx stop
@@ -98,9 +117,18 @@ jobs:
98
117
- name : Run Doc Tests
99
118
run : |
100
119
set -ex
101
- dfx start --background --clean
120
+ if [[ "${{ matrix.pocket-ic }}" == "replica" ]]
121
+ then
122
+ dfx start --background --clean
123
+ else
124
+ dfx start --background --clean --pocketic
125
+ fi
102
126
sleep 1
103
- export IC_REF_PORT=$(dfx info replica-port)
127
+ export IC_REF_PORT=$(dfx info webserver-port)
128
+ if [[ "${{ matrix.pocket-ic }}" == "pocketic" ]]
129
+ then
130
+ export POCKET_IC="http://localhost:${IC_REF_PORT}"
131
+ fi
104
132
cargo test --all-features --doc -- --ignored
105
133
dfx stop
106
134
env :
0 commit comments