Skip to content

Reorganize workflows so that they are all dependent on the same tests… #2403

Reorganize workflows so that they are all dependent on the same tests…

Reorganize workflows so that they are all dependent on the same tests… #2403

Workflow file for this run

name: TestSuite
on:
push:
branches:
- "*"
- '!docs'
tags-ignore:
- "*"
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-testsuite
cancel-in-progress: true
env:
TF_VAR_application_credential_id: ${{ secrets.OS_APPLICATION_CREDENTIAL_ID }}
TF_VAR_application_credential_secret: ${{ secrets.OS_APPLICATION_CREDENTIAL_SECRET }}
TF_VAR_github_repository: ${{ github.repository }}
TF_VAR_github_run_id: ${{ github.run_id }}
TF_VAR_ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }}
TF_VAR_ssh_public_key: ${{ secrets.SSH_PUBLIC_KEY }}
TF_VAR_os_auth_region: ${{ secrets.OS_AUTH_REGION }}
TF_VAR_os_auth_url: ${{ secrets.OS_AUTH_URL }}
TF_VAR_os_interface: ${{ secrets.OS_INTERFACE }}
TF_VAR_os_project_domain_name: ${{ secrets.OS_PROJECT_DOMAIN_NAME }}
TF_VAR_os_password: ${{ secrets.OS_PASSWORD }}
TF_VAR_os_project_id: ${{ secrets.OS_PROJECT_ID }}
TF_VAR_os_project_domain_id: ${{ secrets.OS_PROJECT_DOMAIN_ID }}
TF_VAR_os_project_name: ${{ secrets.OS_PROJECT_NAME }}
TF_VAR_os_region_name: ${{ secrets.OS_REGION_NAME }}
TF_VAR_os_username: ${{ secrets.OS_USERNAME }}
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
CentOS-7:
needs: testsuite
uses: ./.github/workflows/openstack-centos-7.yml
secrets: inherit
CloudLinux-7:
needs: testsuite
uses: ./.github/workflows/openstack-cloudlinux-7.yml
secrets: inherit