Skip to content

Update testflow to support PHP 8.3, and use newer Magento version for tests #157

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
integration_test:
strategy:
matrix:
php_version: [8.1, 8.2] # 8.3 is disabled for now, since Magento 2 does not support this yet.
php_version: [8.1, 8.2, 8.3]
testsuite: [general, brancher]
runs-on: ubuntu-latest
steps:
Expand All @@ -19,12 +19,12 @@ jobs:
env:
PHP_VERSION: ${{ matrix.php_version }}
- name: Start SSH agent for brancher testsuite
if: ${{ matrix.testsuite == 'brancher' && matrix.php_version == '8.2' }}
if: ${{ matrix.testsuite == 'brancher' && matrix.php_version == '8.3' }}
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Run brancher testsuite
if: ${{ matrix.testsuite == 'brancher' && matrix.php_version == '8.2' }}
if: ${{ matrix.testsuite == 'brancher' && matrix.php_version == '8.3' }}
run: ./runtests.sh brancher
shell: bash
env:
Expand Down
64 changes: 30 additions & 34 deletions ci/build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,34 +5,33 @@ ARG PHP_VERSION

ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update \
&& apt-get install -y --no-install-recommends \
git zip unzip wget \
&& rm -rf /var/lib/apt/lists/*
RUN apt-get update

RUN apt-get install -y --no-install-recommends \
git zip unzip wget

# Add repositories
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
gnupg \
software-properties-common \
gettext-base \
&& rm -rf /var/lib/apt/lists/* \
&& curl -sSL http://debian.hypernode.com/repo.key | apt-key add - \
&& echo "deb http://debian.hypernode.com bookworm main hypernode" | tee /etc/apt/sources.list.d/hypernode.list \
&& curl -fsSL https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - \
&& echo "deb http://deb.nodesource.com/node_${NODE_VERSION}.x bookworm main" | tee /etc/apt/sources.list.d/nodesource.list \
RUN apt-get install -y --no-install-recommends \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
gnupg \
software-properties-common \
gettext-base

RUN apt-get clean \
&& curl -fsSL http://debian.hypernode.com/repo.key | gpg --dearmor -o /usr/share/keyrings/hypernode.gpg \
&& echo "deb [signed-by=/usr/share/keyrings/hypernode.gpg] http://debian.hypernode.com bookworm main hypernode" > /etc/apt/sources.list.d/hypernode.list \
&& echo \
"Package: * \
Pin origin deb.nodesource.com \
Pin-Priority: 1001" > /etc/apt/preferences.d/nodejs
"Package: * \
Pin origin debian.hypernode.com \
Pin-Priority: 1000" > /etc/apt/preferences.d/hypernode

RUN curl -fsSL https://deb.nodesource.com/setup_$NODE_VERSION.x | bash -

# Install dependencies
RUN apt-get update && \
apt-get install -y --no-install-recommends \
RUN apt-get install -y --no-install-recommends \
openssh-client \
rsync \
git \
Expand All @@ -52,8 +51,10 @@ RUN apt-get update && \
nodejs \
gnupg \
zip \
bc \
&& apt install -y --no-install-recommends \
bc

# Install PHP
RUN apt-get install -y --no-install-recommends \
php${PHP_VERSION} \
php${PHP_VERSION}-amqp \
php${PHP_VERSION}-bcmath \
Expand All @@ -78,15 +79,10 @@ RUN apt-get update && \
php${PHP_VERSION}-soap \
php${PHP_VERSION}-tidy \
php${PHP_VERSION}-xml \
php${PHP_VERSION}-zip \
&& rm -rf /var/lib/apt/lists/*

# Only install npm if node version is less than 20, otherwise it's already installed
RUN if [ "${NODE_VERSION}" -lt 20 ]; then \
apt-get update \
&& apt-get install -y --no-install-recommends npm \
&& rm -rf /var/lib/apt/lists/*; \
fi
php${PHP_VERSION}-zip

# Confirm NodeJS & NPM are installed
RUN node -v && npm -v

COPY ./.git /hypernode/.git
COPY ./bin /hypernode/bin
Expand Down
2 changes: 1 addition & 1 deletion ci/test/run-brancher.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ DP="docker run --rm -v /tmp/m2build:/web -e HYPERNODE_API_TOKEN -e SSH_PRIVATE_K
# Build Docker image
docker build \
-f ci/build/Dockerfile \
--build-arg NODE_VERSION=16 \
--build-arg NODE_VERSION=22 \
--build-arg PHP_VERSION="${PHP_VERSION:-8.2}" \
-t hndeploy \
.
Expand Down
2 changes: 1 addition & 1 deletion ci/test/run-general.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,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.6-p3 /data/web/magento2
$HN composer create-project --repository=https://mirror.mage-os.org/ magento/project-community-edition:2.4.7-p3 /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
Expand Down
Loading