File tree Expand file tree Collapse file tree 2 files changed +36
-0
lines changed Expand file tree Collapse file tree 2 files changed +36
-0
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,21 @@ test-8.0: ## Test php8.0 build only
3535 VERSION=8.0 VARIANT=apache $(MAKE ) _test-version
3636 VERSION=8.0 VARIANT=fpm $(MAKE ) _test-version
3737
38+ test-node : # # Test node builds only
39+ VERSION=8.3 VARIANT=cli NODE=12 $(MAKE ) _test-node
40+ VERSION=8.3 VARIANT=cli NODE=14 $(MAKE ) _test-node
41+ VERSION=8.3 VARIANT=cli NODE=16 $(MAKE ) _test-node
42+ VERSION=8.3 VARIANT=cli NODE=18 $(MAKE ) _test-node
43+ VERSION=8.3 VARIANT=cli NODE=20 $(MAKE ) _test-node
44+ VERSION=8.3 VARIANT=cli NODE=22 $(MAKE ) _test-node
45+
46+ _test-node : _test-prerequisites # # Test node for VERSION="" and VARIANT=""
47+ docker buildx bake --load \
48+ --set " *.platform=$( uname -p) " \
49+ php$$ {VERSION//.}-$(VARIANT ) -all
50+ PHP_VERSION=" $( VERSION) " BRANCH=v4 VARIANT=$(VARIANT ) NODE=$(NODE ) ./tests-suite/bash_unit -f tap ./tests-suite/* .sh || (notify-send -u critical " Tests failed ($( VERSION) -$( VARIANT) -node$( NODE) )" && exit 1)
51+ notify-send -u critical " Tests passed with success ($( VERSION) -$( VARIANT) -node$( NODE) )"
52+
3853_test-version : _test-prerequisites # # Test php build for VERSION="" and VARIANT=""
3954 docker buildx bake --load \
4055 --set " *.platform=$( uname -p) " \
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ . ./config
3+
4+ if [ -z ${NODE+x} ]; then
5+ echo " -- Node version unset"
6+ return 0;
7+ fi ;
8+ # ###########################################################
9+ # # Run node --version, check for vX.Y.Z version string
10+ # ###########################################################
11+ test_nodeVersion () {
12+ RESULT=$( docker run ${RUN_OPTIONS} --rm " ${REPO} :${TAG_PREFIX}${PHP_VERSION} -${BRANCH} -${BRANCH_VARIANT} -node${NODE} " node --version)
13+ assert_matches " ^v[0-9]+.[0-9]+.[0-9]+" " ${RESULT} " " Missing node"
14+ }
15+ # ###########################################################
16+ # # Run npm --version, check for X.Y.Z version string
17+ # ###########################################################
18+ test_npmVersion () {
19+ RESULT=$( docker run ${RUN_OPTIONS} --rm " ${REPO} :${TAG_PREFIX}${PHP_VERSION} -${BRANCH} -${BRANCH_VARIANT} -node${NODE} " npm --version)
20+ assert_matches " [0-9]+.[0-9]+.[0-9]+" " ${RESULT} " " Missing npm"
21+ }
You can’t perform that action at this time.
0 commit comments