File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11#! /bin/bash
22set -euo pipefail
33
4- echo " 🔍 Running prerelease validation checks..."
4+ echo " Running prerelease validation checks..."
55
6- echo " 📦 Installing dependencies..."
6+ echo " Installing dependencies..."
77npm ci
88
9- echo " 🏗️ Building all workspace packages..."
9+ echo " Building all workspace packages..."
1010npm run build
1111
12- echo " 🔍 Running lint, format , and typecheck... "
13- npm run check
12+ # Run JS checks, dependency checks , and Rust checks in parallel
13+ echo " Running checks in parallel (JS + deps + Rust)... "
1414
15- echo " 🔗 Checking dependency consistency and usage... "
16- npm run deps:check
15+ npm run check &
16+ pid_js= $!
1717
18- echo " Rust lint and format... "
19- ./scripts/rust-lint-format.sh
18+ npm run deps:check &
19+ pid_deps= $!
2020
21- echo " Validation checks complete!"
21+ ./scripts/rust-lint-format.sh &
22+ pid_rust=$!
23+
24+ # Wait for each — set -e will exit on first failure
25+ wait $pid_js
26+ echo " JS checks passed"
27+ wait $pid_deps
28+ echo " Dependency checks passed"
29+ wait $pid_rust
30+ echo " Rust checks passed"
31+
32+ echo " Validation checks complete!"
Original file line number Diff line number Diff line change 11#! /bin/bash
22set -euo pipefail
33
4- echo " Unit testing my-canister-dashboard"
5- npm run test --workspace=@web3nl/my-canister-dashboard
6-
7- echo " Unit testing vite-plugin-canister-dapp"
8- npm run test --workspace=@web3nl/vite-plugin-canister-dapp
9-
10- echo " Unit testing canister-dashboard-frontend"
11- npm run test --workspace=canister-dashboard-frontend
12-
13- echo " Unit testing my-canister-app"
14- npm run test --workspace=my-canister-app
4+ # Run JS unit tests in parallel
5+ echo " Running JS unit tests in parallel..."
6+ npm run test --workspace=@web3nl/my-canister-dashboard &
7+ pid1=$!
8+ npm run test --workspace=@web3nl/vite-plugin-canister-dapp &
9+ pid2=$!
10+ npm run test --workspace=canister-dashboard-frontend &
11+ pid3=$!
12+ npm run test --workspace=my-canister-app &
13+ pid4=$!
14+ wait $pid1 $pid2 $pid3 $pid4
15+ echo " JS unit tests passed"
1516
17+ # Acceptance tests run sequentially (each uses PocketIC)
1618echo " Acceptance testing my-hello-world"
1719cargo run -p canister-dapp-test -- wasm/my-hello-world.wasm.gz
1820
Original file line number Diff line number Diff line change @@ -65,11 +65,15 @@ set -a
6565source tests/test.env
6666set +a
6767
68- # --- Phase 1: Build all frontend assets for Rust canister embedding ---
68+ # --- Phase 1: Build all frontend assets in parallel ---
6969echo " Building frontend assets..."
70- ./scripts/prebuild-mcd.sh
71- npm run build --workspace=my-hello-world-frontend
72- npm run build --workspace=my-notepad-frontend
70+ ./scripts/prebuild-mcd.sh &
71+ pid_mcd=$!
72+ npm run build --workspace=my-hello-world-frontend &
73+ pid_hw=$!
74+ npm run build --workspace=my-notepad-frontend &
75+ pid_np=$!
76+ wait $pid_mcd $pid_hw $pid_np
7377
7478# --- Phase 2: Batch-build all Rust canister wasms ---
7579echo " Batch-building all canister wasms..."
You can’t perform that action at this time.
0 commit comments