Skip to content

Commit

Permalink
Switch testsuite to Alma8
Browse files Browse the repository at this point in the history
  • Loading branch information
atoomic committed Nov 27, 2024
1 parent 920043d commit 89aabdd
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 60 deletions.
26 changes: 15 additions & 11 deletions .github/workflows/testsuite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,36 +21,40 @@ jobs:
PERL_USE_UNSAFE_INC: 1
CPANEL_BIN_PATH: /usr/local/cpanel/3rdparty/bin
CPANEL_PERL: /usr/local/cpanel/3rdparty/perl/536/bin/perl
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true

runs-on: ubuntu-latest

strategy:
fail-fast: false

container:
image: cpanelos/perl-compiler:perl-v5.36.0
image: cpanelos/perl-compiler:alma8-perl-v5.36.0

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup PATH
run: |
echo $CPANEL_BIN_PATH >> $GITHUB_PATH;
$CPANEL_PERL -MConfig -E 'say $Config{sitebin}' >> $GITHUB_PATH
$CPANEL_PERL -MConfig -E 'say $Config{vendorbin}' >> $GITHUB_PATH
echo $CPANEL_BIN_PATH >> $GITHUB_PATH;
$CPANEL_PERL -MConfig -E 'say $Config{sitebin}' >> $GITHUB_PATH
$CPANEL_PERL -MConfig -E 'say $Config{vendorbin}' >> $GITHUB_PATH
- name: Checkout
uses: actions/checkout@v4

- run: perl -V

- name: install Perl dependencies
uses: perl-actions/install-with-cpm@v1.7
uses: perl-actions/install-with-cpm@v1
with:
sudo: false
cpanfile: "t/cpanfile"
args: "--with-all"

- name: cpanel-setup
run: /bin/bash t/cpanel-setup

- name: which prove
run: ls -l $(which prove)

- run: perl -cw elevate-cpanel

- name: Run tests
run: prove -lv -It/lib t/*.t

51 changes: 2 additions & 49 deletions t/cpanel-setup
Original file line number Diff line number Diff line change
Expand Up @@ -5,56 +5,12 @@
# [email protected] http://cpanel.net
# This code is subject to the cPanel license. Unauthorized copying is prohibited.

set -e
set -ex

ULC=/usr/local/cpanel
VERSION=11.110.0.17
REPO=$(pwd)

rm -f /etc/yum.repos.d/CentOS-Base.repo
cat <<'EOF' > /etc/yum.repos.d/CentOS-Base.repo
# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#
[base]
name=CentOS-$releasever - Base
baseurl=https://vault.centos.org/7.9.2009/os/$basearch
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
#released updates
[updates]
name=CentOS-$releasever - Updates
baseurl=https://vault.centos.org/7.9.2009/updates/$basearch
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
baseurl=https://vault.centos.org/7.9.2009/extras/$basearch
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
baseurl=https://vault.centos.org/7.9.2009/centosplus/$basearch
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
EOF

yum clean all

yum install -y \
Expand All @@ -66,6 +22,7 @@ wget http://httpupdate.cpanel.net/cpanelsync/${VERSION}/install/common/cpanel.ta
-o wget.log \
-O cpanel.tar.xz

ls -l cpanel.tar.xz
unxz cpanel.tar.xz

mkdir -p $ULC
Expand Down Expand Up @@ -94,17 +51,13 @@ which perl
ls -l /usr/local/cpanel/3rdparty/perl/536/bin/perl

echo "# ............. cpanm round 2"
#perl bin/cpanm -n Params::Util
perl bin/cpanm -n --cpanfile ${REPO}/t/cpanfile --installdeps .
#Crypt::Cracklib

echo "# ............. scripts/cpservice"
scripts/cpservice cpanel install ||:

echo "# ............. install fake tailwatchd service"
install ${REPO}/t/setup/tailwatchd.fake.service /etc/systemd/system/tailwatchd.service
#systemctl daemon-reload
#systemctl start tailwatchd

echo "# ............. scripts/sysup"
/scripts/sysup ||:
Expand Down

0 comments on commit 89aabdd

Please sign in to comment.