RE-1001: Move GitHub Secrets into Variables that have no Secrecy need #2430
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: | |
# types: [opened, synchronize, reopened] | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }}-testsuite | |
cancel-in-progress: true | |
env: | |
# secrets | |
TF_VAR_application_credential_id: ${{ secrets.OS_APPLICATION_CREDENTIAL_ID }} | |
TF_VAR_application_credential_secret: ${{ secrets.OS_APPLICATION_CREDENTIAL_SECRET }} | |
TF_VAR_ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }} | |
TF_VAR_ssh_public_key: ${{ secrets.SSH_PUBLIC_KEY }} | |
# vars | |
# TF_VAR_os_auth_region: ${{ vars.OS_AUTH_REGION }} | |
TF_VAR_os_auth_url: ${{ vars.OS_AUTH_URL }} | |
TF_VAR_os_auth_type: ${{ vars.OS_AUTH_TYPE }} | |
TF_VAR_os_identity_api_version: ${{ vars.OS_IDENTITY_API_VERSION }} | |
TF_VAR_os_interface: ${{ vars.OS_INTERFACE }} | |
TF_VAR_os_region_name: ${{ vars.OS_AUTH_REGION}} | |
# github | |
TF_VAR_github_repository: ${{ github.repository }} | |
TF_VAR_github_run_id: ${{ github.run_id }} | |
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 | |
if: > | |
(github.event_name == 'pull_request' && github.base_ref == 'main') || | |
(github.event_name == 'push' && github.ref == 'refs/heads/main') | |
# We are disabling CloudLinux for the time being as it's considered undependable at this point on the CLoudLinux side | |
# CloudLinux-7: | |
# needs: testsuite | |
# uses: ./.github/workflows/openstack-cloudlinux-7.yml | |
# secrets: inherit | |
# if: > | |
# (github.event_name == 'pull_request' && github.base_ref == 'main') || | |
# (github.event_name == 'push' && github.ref == 'refs/heads/main') | |
Ubuntu-20: | |
needs: testsuite | |
uses: ./.github/workflows/openstack-ubuntu-20.yml | |
secrets: inherit | |
if: > | |
(github.event_name == 'pull_request' && github.base_ref == 'main') || | |
(github.event_name == 'push' && github.ref == 'refs/heads/main') | |