forked from cpanel/elevate
-
Notifications
You must be signed in to change notification settings - Fork 2
140 lines (116 loc) · 4.37 KB
/
testsuite.yml
File metadata and controls
140 lines (116 loc) · 4.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
name: TestSuite
on:
push:
branches:
- "*"
- "!docs"
tags-ignore:
- "*"
pull_request:
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_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:
if: github.repository == 'webpros-cpanel/app-elevate-cpanel'
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 arc-runners-elevate runner.
container:
image: ghcr.io/webpros-cpanel/misc-ci-containers:ci-elevate-testsuite
steps:
- name: Dump all GitHub variables
run: |
echo "Dumping all GitHub variables:"
echo "github.ref: ${{ github.ref }}"
echo "github.ref_name: ${{ github.ref_name }}"
echo "github.job: ${{ github.job }}"
echo "github.workflow: ${{ github.workflow }}"
echo "github.triggering_actor: ${{ github.triggering_actor }}"
echo "github.event_name: ${{ github.event_name }}"
echo "github.event.repository.master_branch: ${{ github.event.repository.master_branch }}"
- 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@v6
- run: perl -V
- 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
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')
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')
CloudLinux-8:
needs: testsuite
uses: ./.github/workflows/openstack-cloudlinux-8.yml
secrets: inherit
if: >
(github.event_name == 'pull_request' && github.base_ref == 'main') ||
(github.event_name == 'push' && github.ref == 'refs/heads/main')
AlmaLinux-8:
needs: testsuite
uses: ./.github/workflows/openstack-almalinux-8.yml
secrets: inherit
if: >
(github.event_name == 'pull_request' && github.base_ref == 'main') ||
(github.event_name == 'push' && github.ref == 'refs/heads/main')
AlmaLinux-9:
needs: testsuite
uses: ./.github/workflows/openstack-almalinux-9.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')
Ubuntu-22:
needs: testsuite
uses: ./.github/workflows/openstack-ubuntu-22.yml
secrets: inherit
if: >
(github.event_name == 'pull_request' && github.base_ref == 'main') ||
(github.event_name == 'push' && github.ref == 'refs/heads/main')