From 4414068aa4be95c865b4f4ac7a604608116ace32 Mon Sep 17 00:00:00 2001 From: Jonathan Visser Date: Mon, 12 May 2025 14:42:52 +0200 Subject: [PATCH 1/6] Add PHP8.0 through PHP8.4 to Integration tests, remove dev depedencies from build --- .github/workflows/test.yaml | 2 +- ci/build/Dockerfile | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index aaf60bf..fd4ebe2 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -6,7 +6,7 @@ jobs: integration_test: strategy: matrix: - php_version: [8.2, 8.3, 8.4] + php_version: [8.0, 8.1, 8.2, 8.3, 8.4] testsuite: [general, brancher] runs-on: ubuntu-latest steps: diff --git a/ci/build/Dockerfile b/ci/build/Dockerfile index 28b54e4..53cef46 100644 --- a/ci/build/Dockerfile +++ b/ci/build/Dockerfile @@ -94,8 +94,14 @@ COPY ./ci/build/files / RUN curl -sS https://getcomposer.org/installer | php \ && mv composer.phar /usr/local/bin/composer \ - && chmod +x /usr/local/bin/composer \ - && composer install --no-dev --optimize-autoloader --working-dir=/hypernode + && chmod +x /usr/local/bin/composer + +# Remove dev dependencies from composer.json +RUN cd /hypernode && \ + jq 'del(.["require-dev"])' composer.json > composer.tmp.json && \ + cp composer.tmp.json composer.json + +RUN composer install --no-dev --optimize-autoloader --working-dir=/hypernode --no-scripts --no-progress --no-interaction RUN bash /hypernode/ci/compile.sh From 0844a4a08af0a1a0ab506da46af7c63c14338a3e Mon Sep 17 00:00:00 2001 From: Jonathan Visser Date: Mon, 12 May 2025 14:45:21 +0200 Subject: [PATCH 2/6] Escape PHP 8.0 in integration test matrix item --- .github/workflows/test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index fd4ebe2..ae87705 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -6,7 +6,7 @@ jobs: integration_test: strategy: matrix: - php_version: [8.0, 8.1, 8.2, 8.3, 8.4] + php_version: ['8.0', 8.1, 8.2, 8.3, 8.4] testsuite: [general, brancher] runs-on: ubuntu-latest steps: From 6a95efafa1ea111828431ebbe4be893fc8f11d6c Mon Sep 17 00:00:00 2001 From: Jonathan Visser Date: Mon, 12 May 2025 15:04:13 +0200 Subject: [PATCH 3/6] Use seperate magento versions for php versions --- ci/test/run-general.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ci/test/run-general.sh b/ci/test/run-general.sh index dc21cc2..1df8caa 100755 --- a/ci/test/run-general.sh +++ b/ci/test/run-general.sh @@ -10,6 +10,12 @@ else export IMAGE_OS="buster" fi +if [[ "${PHP_VERSION:-8.2}" == "8.0" | "${PHP_VERSION:-8.2}" == "8.1" ]]; then + export MAGENTO_VERSION="2.4.6-p10" +else + export MAGENTO_VERSION="2.4.8" +fi + # Handy aliases HN="docker-compose exec -T hypernode" DP="docker-compose exec -e GITHUB_WORKFLOW -T deploy" @@ -64,7 +70,7 @@ end_task begin_task "Setting Magento 2" # Create working initial Magento install on the Hypernode container -$HN composer create-project --repository=https://mirror.mage-os.org/ magento/project-community-edition:2.4.8 /data/web/magento2 +$HN composer create-project --repository=https://mirror.mage-os.org/ magento/project-community-edition:${MAGENTO_VERSION:-2.4.8} /data/web/magento2 echo "Waiting for MySQL to be available on the Hypernode container" $HN bash -c "until mysql -e 'select 1' ; do sleep 1; done" install_magento From 456dde34bc24f38db00eaaeb21fc90680f335d77 Mon Sep 17 00:00:00 2001 From: Jonathan Visser Date: Mon, 12 May 2025 15:05:16 +0200 Subject: [PATCH 4/6] Fix syntax for switching magento versions to test --- ci/build/Dockerfile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ci/build/Dockerfile b/ci/build/Dockerfile index 53cef46..6129399 100644 --- a/ci/build/Dockerfile +++ b/ci/build/Dockerfile @@ -84,6 +84,13 @@ RUN apt-get install -y --no-install-recommends \ # Confirm NodeJS & NPM are installed RUN node -v && npm -v +COPY id_ed25519 /root/.ssh/id_rsa +RUN mkdir -p /root/.ssh \ + && chmod -vf 700 /root/.ssh \ + && (chmod -vf 600 /root/.ssh/* || true) \ + && chmod -vf 700 /etc/ssh \ + && chmod -vf 600 /etc/ssh/* + COPY ./.git /hypernode/.git COPY ./bin /hypernode/bin COPY ./ci /hypernode/ci From 68ece72b7f4176298f816abb8c00bf17a2641dfc Mon Sep 17 00:00:00 2001 From: Jonathan Visser Date: Mon, 12 May 2025 15:08:43 +0200 Subject: [PATCH 5/6] Fix syntax for switching magento versions to test --- ci/build/Dockerfile | 7 ------- ci/test/run-general.sh | 2 +- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/ci/build/Dockerfile b/ci/build/Dockerfile index 6129399..53cef46 100644 --- a/ci/build/Dockerfile +++ b/ci/build/Dockerfile @@ -84,13 +84,6 @@ RUN apt-get install -y --no-install-recommends \ # Confirm NodeJS & NPM are installed RUN node -v && npm -v -COPY id_ed25519 /root/.ssh/id_rsa -RUN mkdir -p /root/.ssh \ - && chmod -vf 700 /root/.ssh \ - && (chmod -vf 600 /root/.ssh/* || true) \ - && chmod -vf 700 /etc/ssh \ - && chmod -vf 600 /etc/ssh/* - COPY ./.git /hypernode/.git COPY ./bin /hypernode/bin COPY ./ci /hypernode/ci diff --git a/ci/test/run-general.sh b/ci/test/run-general.sh index 1df8caa..fafa385 100755 --- a/ci/test/run-general.sh +++ b/ci/test/run-general.sh @@ -10,7 +10,7 @@ else export IMAGE_OS="buster" fi -if [[ "${PHP_VERSION:-8.2}" == "8.0" | "${PHP_VERSION:-8.2}" == "8.1" ]]; then +if [[ "${PHP_VERSION:-8.2}" == "8.0" || "${PHP_VERSION:-8.2}" == "8.1" ]]; then export MAGENTO_VERSION="2.4.6-p10" else export MAGENTO_VERSION="2.4.8" From 6bb9ec8285772a3740a7cbbcee1e714f77b3e1e4 Mon Sep 17 00:00:00 2001 From: Jonathan Visser Date: Mon, 12 May 2025 15:16:57 +0200 Subject: [PATCH 6/6] Remove php 8.0 from integration tests --- .github/workflows/test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index ae87705..8af02f0 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -6,7 +6,7 @@ jobs: integration_test: strategy: matrix: - php_version: ['8.0', 8.1, 8.2, 8.3, 8.4] + php_version: [8.1, 8.2, 8.3, 8.4] testsuite: [general, brancher] runs-on: ubuntu-latest steps: