diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 5e21b91..2ec743e 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -12,6 +12,7 @@ jobs: - "8.2" - "8.3" - "8.4" + - "8.5" node_version: - 16 - 18 diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 8af02f0..e15cf87 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -6,7 +6,7 @@ jobs: integration_test: strategy: matrix: - php_version: [8.1, 8.2, 8.3, 8.4] + php_version: [8.1, 8.2, 8.3, 8.4, 8.5] testsuite: [general, brancher] runs-on: ubuntu-latest steps: @@ -34,6 +34,7 @@ jobs: code_quality: strategy: matrix: + # PHP 8.5 is not yet compatible with our current version of deployer php_version: [8.1, 8.2, 8.3, 8.4] runs-on: ubuntu-latest steps: diff --git a/ci/build/Dockerfile b/ci/build/Dockerfile index d870d20..1439f57 100644 --- a/ci/build/Dockerfile +++ b/ci/build/Dockerfile @@ -71,7 +71,6 @@ RUN apt-get install -y --no-install-recommends \ php${PHP_VERSION}-mbstring \ php${PHP_VERSION}-mysql \ php${PHP_VERSION}-odbc \ - php${PHP_VERSION}-opcache \ php${PHP_VERSION}-pgsql \ php${PHP_VERSION}-pspell \ php${PHP_VERSION}-readline \ @@ -81,6 +80,11 @@ RUN apt-get install -y --no-install-recommends \ php${PHP_VERSION}-xml \ php${PHP_VERSION}-zip +# Since PHP 8.5 opcache is compiled into PHP itself and no separate package exists +RUN if dpkg --compare-versions "${PHP_VERSION}" lt "8.5"; then \ + apt-get install -y --no-install-recommends php${PHP_VERSION}-opcache; \ + fi + # Confirm NodeJS & NPM are installed RUN node -v && npm -v diff --git a/ci/test/run-general.sh b/ci/test/run-general.sh index a82e1d0..5f43571 100755 --- a/ci/test/run-general.sh +++ b/ci/test/run-general.sh @@ -4,14 +4,24 @@ set -e set -x export PHP_VERSION_SHORT=$(echo "${PHP_VERSION:-8.2}" | sed 's/\.//') -if [[ "${PHP_VERSION:-8.2}" == "8.4" ]]; then +if [[ "${PHP_VERSION:-8.2}" == "8.4" || "${PHP_VERSION:-8.2}" == "8.5" ]]; then export IMAGE_OS="bookworm" else export IMAGE_OS="buster" fi +if [[ "${PHP_VERSION:-8.2}" == "8.5" ]]; then + # Magento 2.4.9 only supports MySQL 8.4, and there is no mysql57 image for PHP 8.5 + export MYSQL_VERSION_SHORT="84" +else + export MYSQL_VERSION_SHORT="57" +fi + if [[ "${PHP_VERSION:-8.2}" == "8.1" ]]; then export MAGENTO_VERSION="2.4.6-p10" +elif [[ "${PHP_VERSION:-8.2}" == "8.5" ]]; then + # Magento 2.4.9 is the first release compatible with PHP 8.5 + export MAGENTO_VERSION="2.4.9" else export MAGENTO_VERSION="2.4.8" fi @@ -81,6 +91,8 @@ $HN /data/web/magento2/bin/magento app:config:dump scopes themes echo "Waiting for SSH to be available on the Hypernode container" chmod 0600 ci/test/.ssh/id_rsa chmod 0600 ci/test/.ssh/authorized_keys +# Magento 2.4.9 creates a root-owned var/cache/symfony that the app user below cannot read +$HN chown -R app:app /data/web/magento2 $DP rsync -a app@hypernode:/data/web/magento2/ /web $DP rsync -a /config/ /web $DP rm /web/app/etc/env.php diff --git a/docker-compose.yaml b/docker-compose.yaml index 0772eba..0329dbd 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -1,7 +1,7 @@ services: hypernode: container_name: hypernode - image: docker.hypernode.com/byteinternet/hypernode-${IMAGE_OS:-buster}-docker-php${PHP_VERSION_SHORT:-81}-mysql57 + image: docker.hypernode.com/byteinternet/hypernode-${IMAGE_OS:-buster}-docker-php${PHP_VERSION_SHORT:-81}-mysql${MYSQL_VERSION_SHORT:-57} volumes: - ./ci/test/.ssh:/root/.ssh ports: