diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 2e442eb..d7bc18c 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 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: @@ -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/ssh-agent@v0.5.4 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: diff --git a/ci/build/Dockerfile b/ci/build/Dockerfile index 2be5624..28b54e4 100644 --- a/ci/build/Dockerfile +++ b/ci/build/Dockerfile @@ -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 \ @@ -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 \ @@ -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 diff --git a/ci/test/run-brancher.sh b/ci/test/run-brancher.sh index 0a43afa..352dfef 100755 --- a/ci/test/run-brancher.sh +++ b/ci/test/run-brancher.sh @@ -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 \ . diff --git a/ci/test/run-general.sh b/ci/test/run-general.sh index 7cb8dd6..49817fa 100755 --- a/ci/test/run-general.sh +++ b/ci/test/run-general.sh @@ -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