Skip to content

Commit bf3ec92

Browse files
authored
Merge pull request #157 from ByteInternet/update-tests
Update testflow to support PHP 8.3, and use newer Magento version for tests
2 parents 81c002f + 0d8a3e1 commit bf3ec92

File tree

4 files changed

+35
-39
lines changed

4 files changed

+35
-39
lines changed

.github/workflows/test.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jobs:
66
integration_test:
77
strategy:
88
matrix:
9-
php_version: [8.1, 8.2] # 8.3 is disabled for now, since Magento 2 does not support this yet.
9+
php_version: [8.1, 8.2, 8.3]
1010
testsuite: [general, brancher]
1111
runs-on: ubuntu-latest
1212
steps:
@@ -19,12 +19,12 @@ jobs:
1919
env:
2020
PHP_VERSION: ${{ matrix.php_version }}
2121
- name: Start SSH agent for brancher testsuite
22-
if: ${{ matrix.testsuite == 'brancher' && matrix.php_version == '8.2' }}
22+
if: ${{ matrix.testsuite == 'brancher' && matrix.php_version == '8.3' }}
2323
uses: webfactory/[email protected]
2424
with:
2525
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
2626
- name: Run brancher testsuite
27-
if: ${{ matrix.testsuite == 'brancher' && matrix.php_version == '8.2' }}
27+
if: ${{ matrix.testsuite == 'brancher' && matrix.php_version == '8.3' }}
2828
run: ./runtests.sh brancher
2929
shell: bash
3030
env:

ci/build/Dockerfile

Lines changed: 30 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -5,34 +5,33 @@ ARG PHP_VERSION
55

66
ENV DEBIAN_FRONTEND=noninteractive
77

8-
RUN apt-get update \
9-
&& apt-get install -y --no-install-recommends \
10-
git zip unzip wget \
11-
&& rm -rf /var/lib/apt/lists/*
8+
RUN apt-get update
9+
10+
RUN apt-get install -y --no-install-recommends \
11+
git zip unzip wget
1212

1313
# Add repositories
14-
RUN apt-get update \
15-
&& apt-get install -y --no-install-recommends \
16-
apt-transport-https \
17-
ca-certificates \
18-
curl \
19-
gnupg-agent \
20-
gnupg \
21-
software-properties-common \
22-
gettext-base \
23-
&& rm -rf /var/lib/apt/lists/* \
24-
&& curl -sSL http://debian.hypernode.com/repo.key | apt-key add - \
25-
&& echo "deb http://debian.hypernode.com bookworm main hypernode" | tee /etc/apt/sources.list.d/hypernode.list \
26-
&& curl -fsSL https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - \
27-
&& echo "deb http://deb.nodesource.com/node_${NODE_VERSION}.x bookworm main" | tee /etc/apt/sources.list.d/nodesource.list \
14+
RUN apt-get install -y --no-install-recommends \
15+
apt-transport-https \
16+
ca-certificates \
17+
curl \
18+
gnupg-agent \
19+
gnupg \
20+
software-properties-common \
21+
gettext-base
22+
23+
RUN apt-get clean \
24+
&& curl -fsSL http://debian.hypernode.com/repo.key | gpg --dearmor -o /usr/share/keyrings/hypernode.gpg \
25+
&& echo "deb [signed-by=/usr/share/keyrings/hypernode.gpg] http://debian.hypernode.com bookworm main hypernode" > /etc/apt/sources.list.d/hypernode.list \
2826
&& echo \
29-
"Package: * \
30-
Pin origin deb.nodesource.com \
31-
Pin-Priority: 1001" > /etc/apt/preferences.d/nodejs
27+
"Package: * \
28+
Pin origin debian.hypernode.com \
29+
Pin-Priority: 1000" > /etc/apt/preferences.d/hypernode
30+
31+
RUN curl -fsSL https://deb.nodesource.com/setup_$NODE_VERSION.x | bash -
3232

3333
# Install dependencies
34-
RUN apt-get update && \
35-
apt-get install -y --no-install-recommends \
34+
RUN apt-get install -y --no-install-recommends \
3635
openssh-client \
3736
rsync \
3837
git \
@@ -52,8 +51,10 @@ RUN apt-get update && \
5251
nodejs \
5352
gnupg \
5453
zip \
55-
bc \
56-
&& apt install -y --no-install-recommends \
54+
bc
55+
56+
# Install PHP
57+
RUN apt-get install -y --no-install-recommends \
5758
php${PHP_VERSION} \
5859
php${PHP_VERSION}-amqp \
5960
php${PHP_VERSION}-bcmath \
@@ -78,15 +79,10 @@ RUN apt-get update && \
7879
php${PHP_VERSION}-soap \
7980
php${PHP_VERSION}-tidy \
8081
php${PHP_VERSION}-xml \
81-
php${PHP_VERSION}-zip \
82-
&& rm -rf /var/lib/apt/lists/*
83-
84-
# Only install npm if node version is less than 20, otherwise it's already installed
85-
RUN if [ "${NODE_VERSION}" -lt 20 ]; then \
86-
apt-get update \
87-
&& apt-get install -y --no-install-recommends npm \
88-
&& rm -rf /var/lib/apt/lists/*; \
89-
fi
82+
php${PHP_VERSION}-zip
83+
84+
# Confirm NodeJS & NPM are installed
85+
RUN node -v && npm -v
9086

9187
COPY ./.git /hypernode/.git
9288
COPY ./bin /hypernode/bin

ci/test/run-brancher.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ DP="docker run --rm -v /tmp/m2build:/web -e HYPERNODE_API_TOKEN -e SSH_PRIVATE_K
1010
# Build Docker image
1111
docker build \
1212
-f ci/build/Dockerfile \
13-
--build-arg NODE_VERSION=16 \
13+
--build-arg NODE_VERSION=22 \
1414
--build-arg PHP_VERSION="${PHP_VERSION:-8.2}" \
1515
-t hndeploy \
1616
.

ci/test/run-general.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ end_task
5959

6060
begin_task "Setting Magento 2"
6161
# Create working initial Magento install on the Hypernode container
62-
$HN composer create-project --repository=https://mirror.mage-os.org/ magento/project-community-edition:2.4.6-p3 /data/web/magento2
62+
$HN composer create-project --repository=https://mirror.mage-os.org/ magento/project-community-edition:2.4.7-p3 /data/web/magento2
6363
echo "Waiting for MySQL to be available on the Hypernode container"
6464
$HN bash -c "until mysql -e 'select 1' ; do sleep 1; done"
6565
install_magento

0 commit comments

Comments
 (0)