diff --git a/.github/workflows/testsuite.yml b/.github/workflows/testsuite.yml index 59e2b96f..23d9effb 100644 --- a/.github/workflows/testsuite.yml +++ b/.github/workflows/testsuite.yml @@ -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/install-with-cpm@v1.7 + + - 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 diff --git a/t/cpanel-setup b/t/cpanel-setup index f3f5a184..b79bd409 100755 --- a/t/cpanel-setup +++ b/t/cpanel-setup @@ -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" diff --git a/t/cpanfile b/t/cpanfile index 54d2fa07..ab772d94 100644 --- a/t/cpanfile +++ b/t/cpanfile @@ -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";