Merge pull request #564 from cpanel/testsuite #2289
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: testsuite | |
on: | |
push: | |
branches: | |
- "*" | |
- '!docs' | |
tags-ignore: | |
- "*" | |
pull_request: | |
workflow_dispatch: | |
workflow_call: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }}-testsuite | |
cancel-in-progress: true | |
jobs: | |
testsuite: | |
env: | |
PERL_USE_UNSAFE_INC: 1 | |
CPANEL_BIN_PATH: /usr/local/cpanel/3rdparty/bin | |
CPANEL_PERL: /usr/local/cpanel/3rdparty/perl/536/bin/perl | |
runs-on: ubuntu-latest | |
# 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:alma8-perl-v5.36.0 | |
steps: | |
- 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 | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- run: perl -V | |
- name: cpanel-setup | |
run: /bin/bash t/cpanel-setup | |
- name: Install Extra Perl dependencies | |
uses: perl-actions/install-with-cpm@v1 | |
with: | |
sudo: false | |
cpanfile: "t/cpanfile" | |
args: "--with-all" | |
- name: which prove | |
run: ls -l $(which prove) | |
- run: perl -cw elevate-cpanel | |
- name: Run tests | |
run: prove -lv -It/lib t/*.t | |