diff --git a/.github/workflows/test-unit.yml b/.github/workflows/test-unit.yml index c6e394dfa0..493fe887ed 100644 --- a/.github/workflows/test-unit.yml +++ b/.github/workflows/test-unit.yml @@ -69,50 +69,15 @@ jobs: USE_GIT_BPO="$(test $VERSION_ID -lt 10 && echo "-t ${DEBIAN_RELEASE}-backports" || echo)" apt-get $USE_GIT_BPO install -y git zip libzip-dev libbz2-dev libpng-dev libjpeg-dev libwebp-dev libvpx-dev libicu-dev - - name: Configure PHP gd extension with default bundle - run: | - if [ $(php -r 'printf(version_compare(PHP_VERSION, "7.4.0", ">=") ? 1 : 0);') = '1' ] - then - docker-php-ext-configure gd --with-jpeg --with-webp - elif [ $(php -r 'printf(version_compare(PHP_VERSION, "7.0.0", ">=") ? 1 : 0);') = '1' ] - then - docker-php-ext-configure gd --with-jpeg-dir=/usr --with-webp-dir=/usr - else - docker-php-ext-configure gd --with-jpeg-dir=/usr --with-vpx-dir=/usr - fi - - - name: Install necessary PHP extensions - run: | - docker-php-ext-install -j "$(nproc)" \ - zip bz2 gd pdo_mysql mysqli intl - - - name: PECL install xdebug - run: | - if [ $(php -r 'printf(version_compare(PHP_VERSION, "8.2.99", ">=") ? 1 : 0);') = '1' ] - then - pecl install https://xdebug.org/files/xdebug-3.3.0alpha2.tgz - elif [ $(php -r 'printf(version_compare(PHP_VERSION, "8.0.0", ">=") ? 1 : 0);') = '1' ] - then - pecl install xdebug - elif [ $(php -r 'printf(version_compare(PHP_VERSION, "7.2.0", ">=") ? 1 : 0);') = '1' ] - then - pecl install xdebug-3.1.6 - elif [ $(php -r 'printf(version_compare(PHP_VERSION, "7.1.0", ">=") ? 1 : 0);') = '1' ] - then - pecl install xdebug-2.9.8 - elif [ $(php -r 'printf(version_compare(PHP_VERSION, "7.0.0", ">=") ? 1 : 0);') = '1' ] - then - pecl install xdebug-2.7.2 - else - pecl install xdebug-2.5.5 - fi - docker-php-ext-enable xdebug + - name: Install PHP extensions and tools + uses: shivammathur/setup-php@v2 + with: + extensions: zip, bz2, gd, pdo_mysql, mysqli, intl + coverage: xdebug + tools: composer - uses: actions/checkout@v3 - - name: Install Composer - run: curl -sSL https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin/ --filename=composer - - name: Install test dependencies run: composer update --prefer-dist --no-progress working-directory: ./e107_tests/