diff --git a/.github/workflows/test-features.yml b/.github/workflows/test-features.yml index 0d452d0f..5d8fad5c 100644 --- a/.github/workflows/test-features.yml +++ b/.github/workflows/test-features.yml @@ -27,13 +27,14 @@ jobs: matrix: baseImage: - debian:latest - - ubuntu:latest + - ubuntu:jammy # noble is not supported by ondrej/php yet - mcr.microsoft.com/devcontainers/base:ubuntu - mcr.microsoft.com/devcontainers/base:debian - mcr.microsoft.com/devcontainers/base:alpine feature: - base - dev-tools + - php - su-exec - vip-cli - wp-cli diff --git a/features/test/php/test.sh b/features/test/php/test.sh new file mode 100644 index 00000000..1942e804 --- /dev/null +++ b/features/test/php/test.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +# shellcheck source=/dev/null +source dev-container-features-test-lib + +check "php exists" which php +check "php-fpm exists" which php-fpm +check "pecl exists" which pecl +check "pear exists" which pear +check "composer exists" which composer +check "www-data user exists" getent passwd www-data +check "www-data group exists" getent group www-data + +php -m + +# gnupg is not available on Alpine +MODULES="apcu bcmath calendar ctype curl date dom exif fileinfo filter ftp gd gmagick gmp hash iconv igbinary intl json libxml mbstring mcrypt memcache memcached mysqli mysqlnd openssl pcntl pcre pdo_mysql pdo_sqlite phar posix random reflection session shmop simplexml soap sockets sodium sqlite3 ssh2 sysvsem sysvshm timezonedb tokenizer xml xmlreader xmlwriter zip zlib" +for module in $MODULES; do + check "PHP module ${module} exists" sh -c "php -m | grep -qi ^${module}$" +done + +reportResults