Skip to content

Commit c5b22c7

Browse files
committed
run tests on php 8.5; refactor test env build scripts
1 parent f095a46 commit c5b22c7

8 files changed

Lines changed: 179 additions & 89 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ jobs:
2424
include:
2525
# @see https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners
2626
# @todo run some tests on 'windows-latest' (needs test env setup scripts for windows to be developed)
27+
- php: '8.5'
28+
operating-system: ubuntu-24.04
2729
- php: '8.4'
2830
operating-system: ubuntu-24.04
2931
sslversion: 7

tests/ci/Dockerfile

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,14 @@
1-
ARG UBUNTU_VERSION=focal
1+
ARG UBUNTU_VERSION=jammy
22

33
FROM ubuntu:${UBUNTU_VERSION}
44

55
ARG PHP_VERSION=default
6-
ARG UBUNTU_VERSION=focal
6+
ARG UBUNTU_VERSION=jammy
77

8-
COPY setup/*.sh /root/setup/
8+
COPY --chmod=755 setup/*.sh /root/setup/
99
COPY config/* /root/config/
1010

1111
RUN if [ ! -f /.dockerenv ]; then touch /.dockerenv; fi && \
12-
mkdir -p /usr/share/man/man1 && \
13-
apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -y upgrade && \
14-
chmod 755 /root/setup/*.sh && \
1512
cd /root/setup && \
1613
./install_packages.sh && \
1714
./create_user.sh && \
@@ -23,8 +20,7 @@ RUN if [ ! -f /.dockerenv ]; then touch /.dockerenv; fi && \
2320
echo "PHP_VERSION=${PHP_VERSION}" > /etc/build-info && \
2421
echo "UBUNTU_VERSION=${UBUNTU_VERSION}" >> /etc/build-info
2522

26-
COPY docker/entrypoint.sh /root/entrypoint.sh
27-
RUN chmod 755 /root/entrypoint.sh
23+
COPY --chmod=755 docker/entrypoint.sh /root/entrypoint.sh
2824

2925
EXPOSE 80 443 8080
3026

tests/ci/matrix.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ PHP_LIST_xenial=${PHP_LIST_xenial:-default 5.4}
1616
PHP_LIST_bionic=${PHP_LIST_bionic:-default 5.5}
1717
PHP_LIST_focal=${PHP_LIST_focal:-default 5.4}
1818
PHP_LIST_jammy=${PHP_LIST_jammy:-default 5.5 7.1 7.3 8.2 8.3}
19-
PHP_LIST_noble=${PHP_LIST_noble:-default 5.6 7.2 7.4 8.1 8.4}
19+
PHP_LIST_noble=${PHP_LIST_noble:-default 5.6 7.2 7.4 8.1 8.4 8.5}
2020

2121
STARTING_HTTPPORT="${STARTING_HTTPPORT:-81}"
2222
STARTING_HTTPSPORT="${STARTING_HTTPSPORT:-444}"

tests/ci/setup/install_packages.sh

Lines changed: 8 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,31 +6,20 @@ set -e
66

77
echo "Installing base software packages..."
88

9-
# @todo allow optional updating of preinstalled sw
9+
# @todo make updating of preinstalled sw optional, so that f.e. we can have faster builds as part of CI
10+
11+
export DEBIAN_FRONTEND=noninteractive
12+
13+
if [ ! -d /usr/share/man/man1 ]; then mkdir -p /usr/share/man/man1; fi
1014

1115
apt-get update
1216

13-
# adduser is not preinstalled on noble
14-
DEBIAN_FRONTEND=noninteractive apt-get install -y \
17+
apt-get upgrade -y
18+
19+
apt-get install -y \
1520
locales sudo unzip wget
1621

1722
# We set up one locale which uses the comma as decimal separator. Used by the testsuite
1823
locale-gen de_DE de_DE.UTF-8
1924

20-
# In case we will be using php5.x from shivammatur, it has a dependency on a lib missing from bionic
21-
# `lsb-release` is not necessarily onboard. We parse /etc/os-release instead
22-
DEBIAN_VERSION=$(grep 'VERSION_CODENAME=' /etc/os-release | sed 's/VERSION_CODENAME=//')
23-
if [ -z "${DEBIAN_VERSION}" ]; then
24-
# Example strings:
25-
# VERSION="14.04.6 LTS, Trusty Tahr"
26-
# VERSION="18.04.6 LTS (Bionic Beaver)"
27-
# VERSION="8 (jessie)"
28-
DEBIAN_VERSION="$(grep 'VERSION=' /etc/os-release | sed 's/VERSION= *//' | sed 's/ *["0-9.,()]\+ *//g'| tr '[:upper:]' '[:lower:]' | sed 's/ *lts *//' | cut -d' ' -f 1)"
29-
fi
30-
if [ "$DEBIAN_VERSION" = bionic ]; then
31-
wget https://launchpad.net/~ubuntu-security/+archive/ubuntu/ppa/+build/15108504/+files/libpng12-0_1.2.54-1ubuntu1.1_amd64.deb
32-
dpkg --install libpng12-0_1.2.54-1ubuntu1.1_amd64.deb
33-
rm libpng12-0_1.2.54-1ubuntu1.1_amd64.deb
34-
fi
35-
3625
echo "Done installing base software packages"

tests/ci/setup/setup_apache.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,17 @@
22

33
# Install and configure apache2
44
# Has to be run as admin
5-
# @todo make this work across all ubuntu versions (precise to jammy)
5+
# @todo make this work across all ubuntu versions (precise to noble)
66

77
echo "Installing and configuring Apache2..."
88

99
set -e
1010

1111
SCRIPT_DIR="$(dirname -- "$(readlink -f "$0")")"
1212

13-
DEBIAN_FRONTEND=noninteractive apt-get install -y apache2
13+
export DEBIAN_FRONTEND=noninteractive
14+
15+
apt-get install -y apache2
1416

1517
# set up Apache for php-fpm
1618

tests/ci/setup/setup_composer.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/sh
22

33
# Installs Composer (latest version, to avoid relying on old ones bundled with the OS)
4-
# @todo allow users to lock down to Composer v1 if needed
4+
# @todo allow users to lock down to Composer v1 or v2.2 if needed
55

66
echo "Installing Composer..."
77

0 commit comments

Comments
 (0)