82
82
steps :
83
83
- uses : actions/checkout@v3
84
84
85
+ - name : Ensure, OpenSSL is available in Windows
86
+ if : matrix.os == 'windows-latest'
87
+ run : |
88
+ echo "VCPKG_ROOT=$env:VCPKG_INSTALLATION_ROOT" | Out-File -FilePath $env:GITHUB_ENV -Append
89
+ vcpkg install openssl:x64-windows-static-md
90
+
85
91
- name : Setup Rust and cache
86
92
uses : ' ./.github/actions/rust/rust-setup'
87
93
with :
@@ -120,15 +126,18 @@ jobs:
120
126
run : cargo clean
121
127
122
128
# Build the library, tests, and examples without running them to avoid recompilation in the run tests step
123
- - name : Build with all features
124
- run : cargo build --workspace --tests --examples --all-features -- release
129
+ - name : Build with default features
130
+ run : cargo build --workspace --tests --examples --release
125
131
126
132
- name : Start iota sandbox
127
133
if : matrix.os == 'ubuntu-latest'
128
134
uses : ' ./.github/actions/iota-sandbox/setup'
129
135
130
- - name : Run tests
131
- run : cargo test --workspace --all-features --release
136
+ - name : Run tests excluding `custom_time` feature
137
+ run : cargo test --workspace --release
138
+
139
+ - name : Run tests with `custom_time` feature
140
+ run : cargo test --test custom_time --features="custom_time"
132
141
133
142
- name : Run Rust examples
134
143
# run examples only on ubuntu for now
@@ -151,7 +160,7 @@ jobs:
151
160
- name : Tear down iota sandbox
152
161
if : matrix.os == 'ubuntu-latest' && always()
153
162
uses : ' ./.github/actions/iota-sandbox/tear-down'
154
-
163
+
155
164
- name : Stop sccache
156
165
uses : ' ./.github/actions/rust/sccache/stop-sccache'
157
166
with :
@@ -189,7 +198,7 @@ jobs:
189
198
working-directory : bindings/wasm
190
199
191
200
- name : Download bindings/wasm artifacts
192
- uses : actions/download-artifact@v2
201
+ uses : actions/download-artifact@v4
193
202
with :
194
203
name : identity-wasm-bindings-build
195
204
path : bindings/wasm
@@ -198,9 +207,105 @@ jobs:
198
207
uses : ' ./.github/actions/iota-sandbox/setup'
199
208
200
209
- name : Run Wasm examples
201
- run : npm run test:examples
210
+ run : npm run test:readme && npm run test:node
202
211
working-directory : bindings/wasm
203
212
204
213
- name : Tear down iota sandbox
205
214
if : always()
206
215
uses : ' ./.github/actions/iota-sandbox/tear-down'
216
+
217
+ test-wasm-firefox :
218
+ needs : build-wasm
219
+ if : ${{ needs.check-for-run-condition.outputs.should-run == 'true' }}
220
+ runs-on : ubuntu-latest
221
+ strategy :
222
+ fail-fast : false
223
+ matrix :
224
+ os : [ ubuntu-latest ]
225
+ include :
226
+ - os : ubuntu-latest
227
+
228
+ steps :
229
+ - uses : actions/checkout@v3
230
+
231
+ - name : Set up Node.js
232
+ uses : actions/setup-node@v1
233
+ with :
234
+ node-version : 16.x
235
+
236
+ - name : Install JS dependencies
237
+ run : npm ci
238
+ working-directory : bindings/wasm
239
+
240
+ - name : Download bindings/wasm artifacts
241
+ uses : actions/download-artifact@v4
242
+ with :
243
+ name : identity-wasm-bindings-build
244
+ path : bindings/wasm
245
+
246
+ - name : Start iota sandbox
247
+ uses : ' ./.github/actions/iota-sandbox/setup'
248
+
249
+ - name : Build Docker image
250
+ uses : docker/build-push-action@v6.2.0
251
+ with :
252
+ context : bindings/wasm/
253
+ file : bindings/wasm/cypress/Dockerfile
254
+ push : false
255
+ tags : cypress-test:latest
256
+ load : true
257
+
258
+ - name : Run cypress
259
+ run : docker run --network host cypress-test test:browser:parallel:firefox
260
+
261
+ - name : Tear down iota sandbox
262
+ if : always()
263
+ uses : ' ./.github/actions/iota-sandbox/tear-down'
264
+
265
+ test-wasm-chrome :
266
+ needs : build-wasm
267
+ if : ${{ needs.check-for-run-condition.outputs.should-run == 'true' }}
268
+ runs-on : ubuntu-latest
269
+ strategy :
270
+ fail-fast : false
271
+ matrix :
272
+ os : [ ubuntu-latest ]
273
+ include :
274
+ - os : ubuntu-latest
275
+
276
+ steps :
277
+ - uses : actions/checkout@v3
278
+
279
+ - name : Set up Node.js
280
+ uses : actions/setup-node@v1
281
+ with :
282
+ node-version : 16.x
283
+
284
+ - name : Install JS dependencies
285
+ run : npm ci
286
+ working-directory : bindings/wasm
287
+
288
+ - name : Download bindings/wasm artifacts
289
+ uses : actions/download-artifact@v4
290
+ with :
291
+ name : identity-wasm-bindings-build
292
+ path : bindings/wasm
293
+
294
+ - name : Start iota sandbox
295
+ uses : ' ./.github/actions/iota-sandbox/setup'
296
+
297
+ - name : Build Docker image
298
+ uses : docker/build-push-action@v6.2.0
299
+ with :
300
+ context : bindings/wasm/
301
+ file : bindings/wasm/cypress/Dockerfile
302
+ push : false
303
+ tags : cypress-test:latest
304
+ load : true
305
+
306
+ - name : Run cypress
307
+ run : docker run --network host cypress-test test:browser:parallel:chrome
308
+
309
+ - name : Tear down iota sandbox
310
+ if : always()
311
+ uses : ' ./.github/actions/iota-sandbox/tear-down'
0 commit comments