Skip to content

Commit 1b3d1b3

Browse files
authored
Merge pull request #159 from ByteInternet/add-integration-tests-for-php80-to-php84-and-dont-build-with-dev-deps
Add PHP8.1 through PHP8.4 to Integration tests, remove dev depedencies from build
2 parents 1e7f162 + 6bb9ec8 commit 1b3d1b3

File tree

3 files changed

+16
-4
lines changed

3 files changed

+16
-4
lines changed

.github/workflows/test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jobs:
66
integration_test:
77
strategy:
88
matrix:
9-
php_version: [8.2, 8.3, 8.4]
9+
php_version: [8.1, 8.2, 8.3, 8.4]
1010
testsuite: [general, brancher]
1111
runs-on: ubuntu-latest
1212
steps:

ci/build/Dockerfile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,14 @@ COPY ./ci/build/files /
9494

9595
RUN curl -sS https://getcomposer.org/installer | php \
9696
&& mv composer.phar /usr/local/bin/composer \
97-
&& chmod +x /usr/local/bin/composer \
98-
&& composer install --no-dev --optimize-autoloader --working-dir=/hypernode
97+
&& chmod +x /usr/local/bin/composer
98+
99+
# Remove dev dependencies from composer.json
100+
RUN cd /hypernode && \
101+
jq 'del(.["require-dev"])' composer.json > composer.tmp.json && \
102+
cp composer.tmp.json composer.json
103+
104+
RUN composer install --no-dev --optimize-autoloader --working-dir=/hypernode --no-scripts --no-progress --no-interaction
99105

100106
RUN bash /hypernode/ci/compile.sh
101107

ci/test/run-general.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ else
1010
export IMAGE_OS="buster"
1111
fi
1212

13+
if [[ "${PHP_VERSION:-8.2}" == "8.0" || "${PHP_VERSION:-8.2}" == "8.1" ]]; then
14+
export MAGENTO_VERSION="2.4.6-p10"
15+
else
16+
export MAGENTO_VERSION="2.4.8"
17+
fi
18+
1319
# Handy aliases
1420
HN="docker-compose exec -T hypernode"
1521
DP="docker-compose exec -e GITHUB_WORKFLOW -T deploy"
@@ -64,7 +70,7 @@ end_task
6470

6571
begin_task "Setting Magento 2"
6672
# Create working initial Magento install on the Hypernode container
67-
$HN composer create-project --repository=https://mirror.mage-os.org/ magento/project-community-edition:2.4.8 /data/web/magento2
73+
$HN composer create-project --repository=https://mirror.mage-os.org/ magento/project-community-edition:${MAGENTO_VERSION:-2.4.8} /data/web/magento2
6874
echo "Waiting for MySQL to be available on the Hypernode container"
6975
$HN bash -c "until mysql -e 'select 1' ; do sleep 1; done"
7076
install_magento

0 commit comments

Comments
 (0)