From 7886cfc80ba781e90536574d74a1495de8ba1338 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6nig?= Date: Mon, 31 Mar 2025 12:13:34 +0200 Subject: [PATCH] Add CentOS 10 to test suite MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christian König --- .github/workflows/test.yml | 1 + test/_centos_10.Dockerfile | 20 ++++++++++++++++++++ test/tox.centos_10.ini | 10 ++++++++++ 3 files changed, 31 insertions(+) create mode 100644 test/_centos_10.Dockerfile create mode 100644 test/tox.centos_10.ini diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 43cd8ad4..ff31b080 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -67,6 +67,7 @@ jobs: ubuntu_22, ubuntu_24, centos_9, + centos_10, fedora_40, fedora_41, ] diff --git a/test/_centos_10.Dockerfile b/test/_centos_10.Dockerfile new file mode 100644 index 00000000..ca439e1b --- /dev/null +++ b/test/_centos_10.Dockerfile @@ -0,0 +1,20 @@ +FROM quay.io/centos/centos:stream10 +# Disable SELinux +RUN echo "SELINUX=disabled" > /etc/selinux/config +RUN yum install -y --allowerasing curl git initscripts + +ENV GITDIR=/etc/.pihole +ENV SCRIPTDIR=/opt/pihole + +RUN mkdir -p $GITDIR $SCRIPTDIR /etc/pihole +ADD . $GITDIR +RUN cp $GITDIR/advanced/Scripts/*.sh $GITDIR/gravity.sh $GITDIR/pihole $GITDIR/automated\ install/*.sh $GITDIR/advanced/Scripts/COL_TABLE $SCRIPTDIR/ +ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:$SCRIPTDIR + +RUN true && \ + chmod +x $SCRIPTDIR/* + +ENV SKIP_INSTALL=true +ENV OS_CHECK_DOMAIN_NAME=dev-supportedos.pi-hole.net + +#sed '/# Start the installer/Q' /opt/pihole/basic-install.sh > /opt/pihole/stub_basic-install.sh && \ diff --git a/test/tox.centos_10.ini b/test/tox.centos_10.ini new file mode 100644 index 00000000..1a15c766 --- /dev/null +++ b/test/tox.centos_10.ini @@ -0,0 +1,10 @@ +[tox] +envlist = py3 + +[testenv:py3] +allowlist_externals = docker +deps = -rrequirements.txt +setenv = + COLUMNS=120 +commands = docker buildx build --load --progress plain -f _centos_10.Dockerfile -t pytest_pihole:test_container ../ + pytest {posargs:-vv -n auto} ./test_any_automated_install.py ./test_any_utils.py ./test_centos_fedora_common_support.py