File tree Expand file tree Collapse file tree 1 file changed +13
-7
lines changed
Expand file tree Collapse file tree 1 file changed +13
-7
lines changed Original file line number Diff line number Diff line change 1111docker compose down --remove-orphans || true
1212
1313PHP_VERSIONS=(" 7.2" " 7.4" " 8.0" " 8.2" " 8.3" " 8.4" " 8.5" )
14+ PHP_SERVICES=()
15+ for v in " ${PHP_VERSIONS[@]} " ; do
16+ PHP_SERVICES+=(" phpunit-${v} " )
17+ done
18+
19+ # Build all images in parallel first
20+ printf " Building images in parallel: %s\n" " ${PHP_SERVICES[*]} "
21+ if ! docker compose build --parallel " ${PHP_SERVICES[@]} " ; then
22+ printf " \e[31mOne or more builds failed.\e[0m\n"
23+ exit 1
24+ fi
25+
1426TESTS_PASSED=true
1527EXIT_CODE=0
1628
1729run_phpunit_tests () {
1830 local php_version=" $1 "
1931 printf " \n================[ Testing PHP ${php_version} : ]=============================================\n\n"
2032
21- # Build the image
22- if ! docker compose build " phpunit-${php_version} " ; then
23- printf " \e[31mBuild failed for PHP ${php_version} .\e[0m\n"
24- return 1
25- fi
26-
27- # Use --rm to remove the ephemeral container after run
33+ # Run the test container (image already built above)
2834 if ! docker compose run --rm " phpunit-${php_version} " ; then
2935 printf " \e[31mRun failed for PHP ${php_version} .\e[0m\n"
3036 return 1
You can’t perform that action at this time.
0 commit comments