File tree Expand file tree Collapse file tree 2 files changed +30
-3
lines changed
Expand file tree Collapse file tree 2 files changed +30
-3
lines changed Original file line number Diff line number Diff line change 3939 "local-proxy" : " node ./dist/run_locally.js" ,
4040 "test" : " nyc cross-env NODE_OPTIONS=--insecure-http-parser mocha" ,
4141 "test:docker" : " docker build --tag proxy-chain-tests --file test/Dockerfile . && docker run proxy-chain-tests" ,
42- "test:docker:node18" : " docker build --build-arg NODE_IMAGE=node:18.20.8-bookworm --tag proxy-chain-tests:node18 --file test/Dockerfile . && docker run proxy-chain-tests:node18" ,
43- "test:docker:node16" : " docker build --build-arg NODE_IMAGE=node:16.20.2-bookworm --tag proxy-chain-tests:node16 --file test/Dockerfile . && docker run proxy-chain-tests:node16" ,
44- "test:docker:node14" : " docker build --build-arg NODE_IMAGE=node:14.21.3-bullseye --tag proxy-chain-tests:node14 --file test/Dockerfile . && docker run proxy-chain-tests:node14" ,
42+ "test:docker:all" : " bash scripts/test-docker-all.sh" ,
4543 "lint" : " eslint ." ,
4644 "lint:fix" : " eslint . --fix"
4745 },
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ echo " Starting parallel Docker tests for Node 14, 16, and 18..."
4+
5+ # Run builds in parallel, capture PIDs.
6+ docker build --build-arg NODE_IMAGE=node:14.21.3-bullseye --tag proxy-chain-tests:node14 --file test/Dockerfile . && docker run proxy-chain-tests:node14 &
7+ pid14=$!
8+ docker build --build-arg NODE_IMAGE=node:16.20.2-bookworm --tag proxy-chain-tests:node16 --file test/Dockerfile . && docker run proxy-chain-tests:node16 &
9+ pid16=$!
10+ docker build --build-arg NODE_IMAGE=node:18.20.8-bookworm --tag proxy-chain-tests:node18 --file test/Dockerfile . && docker run proxy-chain-tests:node18 &
11+ pid18=$!
12+
13+ # Wait for all and capture exit codes.
14+ wait $pid14
15+ ec14=$?
16+ wait $pid16
17+ ec16=$?
18+ wait $pid18
19+ ec18=$?
20+
21+ echo " "
22+ echo " ========== Results =========="
23+ echo " Node 14: $( [ $ec14 -eq 0 ] && echo ' PASS' || echo ' FAIL' ) "
24+ echo " Node 16: $( [ $ec16 -eq 0 ] && echo ' PASS' || echo ' FAIL' ) "
25+ echo " Node 18: $( [ $ec18 -eq 0 ] && echo ' PASS' || echo ' FAIL' ) "
26+ echo " ============================="
27+
28+ # Exit with non-zero if any failed.
29+ exit $(( ec14 + ec16 + ec18 ))
You can’t perform that action at this time.
0 commit comments