From 1023d73ac98e3d76f1574f5bf794f8670b489572 Mon Sep 17 00:00:00 2001 From: camer0n Date: Mon, 17 Mar 2025 14:17:01 -0700 Subject: [PATCH] Issue #5443 Use PHP 8 for acceptance tests. --- .github/workflows/test-acceptance.yml | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-acceptance.yml b/.github/workflows/test-acceptance.yml index 3cecf345e..a4a4f840b 100644 --- a/.github/workflows/test-acceptance.yml +++ b/.github/workflows/test-acceptance.yml @@ -9,9 +9,12 @@ jobs: strategy: fail-fast: false matrix: + php_version: + - "8.0" # Test with PHP 8.0 + # Uncomment the line below to also test with PHP 8.4 + # - "8.4" operating_system: - - image: docker.io/jrei/systemd-ubuntu:20.04 - - image: docker.io/jrei/systemd-ubuntu:22.04 + - image: docker.io/jrei/systemd-ubuntu:20.04 # Base image with PHP 8.0 runs-on: ubuntu-latest steps: @@ -48,6 +51,23 @@ jobs: " working-directory: ./e107_tests/lib/ci/salt/ + - name: Install PHP and extensions + run: | + docker exec target apt-get update + docker exec target apt-get install -y software-properties-common + # Add ondrej/php PPA for PHP 8.4 support (optional) + docker exec target add-apt-repository ppa:ondrej/php -y + docker exec target apt-get update + # Install PHP and required extensions + docker exec target apt-get install -y php${{ matrix.php_version }} php${{ matrix.php_version }}-zip php${{ matrix.php_version }}-curl php${{ matrix.php_version }}-mbstring php${{ matrix.php_version }}-xml + # Set the specified PHP version as the default + docker exec target update-alternatives --set php /usr/bin/php${{ matrix.php_version }} + # Note: For PHP 8.0 on Ubuntu 20.04, this step will essentially ensure the default version is used and extensions are installed. + + - name: Verify PHP version + run: docker exec target php -v + # This step helps confirm the PHP version in use. + - name: Install test dependencies run: | docker exec -w /app/e107_tests/ -e COMPOSER_ALLOW_SUPERUSER=1 target \