File tree Expand file tree Collapse file tree 2 files changed +20
-21
lines changed Expand file tree Collapse file tree 2 files changed +20
-21
lines changed Original file line number Diff line number Diff line change @@ -27,21 +27,7 @@ for version in "${versions[@]}"; do
2727 fi
2828 info " Build of $tag succeeded."
2929
30- OUTPUT=$( docker run --rm -it node:" $tag " node -e " process.stdout.write(process.versions.node)" )
31- if [ " $OUTPUT " != " $full_version " ]; then
32- fatal " Test of $tag for node failed!"
33- fi
34- info " Test of $tag for node succeeded."
35-
36- if ! docker run --rm -i node:" $tag " npm --version; then
37- fatal " Test of $tag for npm failed!"
38- fi
39- info " Test of $tag for npm succeeded."
40-
41- if ! docker run --rm -i node:" $tag " yarn --version; then
42- fatal " Test of $tag for yarn failed!"
43- fi
44- info " Test of $tag for yarn succeeded."
30+ docker run --rm -v " $PWD /test-image.sh:/usr/local/bin/test.sh" node:" $tag " test.sh " $full_version "
4531
4632 # Get supported variants according to the target architecture.
4733 # See details in function.sh
@@ -58,12 +44,7 @@ for version in "${versions[@]}"; do
5844 fi
5945 info " Build of $tag -$variant succeeded."
6046
61- OUTPUT=$( docker run --rm -it node:" $tag -$variant " node -e " process.stdout.write(process.versions.node)" )
62- if [ " $OUTPUT " != " $full_version " ]; then
63- fatal " Test of $tag -$variant failed!"
64- fi
65- info " Test of $tag -$variant succeeded."
66-
47+ docker run --rm -v " $PWD /test-image.sh:/usr/local/bin/test.sh" node:" $tag -$variant " test.sh " $full_version "
6748 done
6849
6950done
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+ if [ " $( node -e " process.stdout.write(process.versions.node)" ) " != " $1 " ]; then
3+ echo " Test for node failed!"
4+ exit 1
5+ fi
6+ echo " Test for node succeeded."
7+
8+ if ! npm --version > /dev/null; then
9+ echo " Test for npm failed!"
10+ exit 2
11+ fi
12+ echo " Test for npm succeeded."
13+
14+ if ! yarn --version > /dev/null; then
15+ echo " Test of yarn failed!"
16+ exit 3
17+ fi
18+ echo " Test for yarn succeeded."
You can’t perform that action at this time.
0 commit comments