Skip to content

Commit

Permalink
Switch testsuite to Alma8
Browse files Browse the repository at this point in the history
  • Loading branch information
atoomic authored and davelcpanelnet committed Dec 2, 2024
1 parent ee83604 commit fb3954e
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 14 deletions.
32 changes: 19 additions & 13 deletions .github/workflows/testsuite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,37 +21,43 @@ 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_RUNNER_FORCE_ACTIONS_NODE_VERSION: node20
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true

runs-on: ubuntu-latest

strategy:
fail-fast: false

# Note: the container is not a CentOS 7 distro
# this is ok if we use it for unit test purpose
# we are also relying on e2e test using C7 VM on self-hosted runner.
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/[email protected]

- name: Install Perl dependencies
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

4 changes: 3 additions & 1 deletion t/cpanel-setup
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ echo "# ............. which perl"
which perl
ls -l /usr/local/cpanel/3rdparty/perl/536/bin/perl

echo "# ............. scripts/cpservice"
echo "# ............. cpanm round 2"
perl bin/cpanm -n --cpanfile ${REPO}/t/cpanfile --installdeps .

scripts/cpservice cpanel install ||:

echo "# ............. install fake tailwatchd service"
Expand Down
11 changes: 11 additions & 0 deletions t/cpanfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,17 @@

# test
on 'test' => sub {
requires "File::Temp";
requires "Overload::FileCheck";
requires "Pod::PlainText";
requires "Test2::Bundle::Extended";
requires "Test2::Plugin::NoWarnings";
requires "Test2::Tools::Explain";
requires "Test::MockFile" => "0.032";
requires "Test::MockModule";
requires "Test::More";
requires "Test::Class";
requires "Test::Simple";

requires "Test::MockFile" => "0.032";

Expand Down

0 comments on commit fb3954e

Please sign in to comment.