-
Notifications
You must be signed in to change notification settings - Fork 13
126 lines (105 loc) · 4.46 KB
/
qe.yml
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
---
name: QE Testing (Ubuntu-hosted)
on:
pull_request:
branches: [ main ]
workflow_dispatch:
# Schedule a daily cron at midnight UTC
schedule:
- cron: '0 0 * * *'
env:
TEST_REPO: redhat-best-practices-for-k8s/certsuite
jobs:
qe-testing:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
suite: [accesscontrol, affiliatedcertification, manageability, networking, lifecycle, performance, platformalteration, observability, operator]
env:
SHELL: /bin/bash
KUBECONFIG: '/home/runner/.kube/config'
PFLT_DOCKERCONFIG: '/home/runner/.docker/config'
TEST_CERTSUITE_IMAGE_NAME: quay.io/redhat-best-practices-for-k8s/certsuite
TEST_CERTSUITE_IMAGE_TAG: unstable
DOCKER_CONFIG_DIR: '/home/runner/.docker/'
SKIP_PRELOAD_IMAGES: true # Not needed for github-hosted runs
steps:
- name: Write temporary docker file
run: |
mkdir -p /home/runner/.docker
touch ${PFLT_DOCKERCONFIG}
echo '{ "auths": {} }' >> ${PFLT_DOCKERCONFIG}
- name: Check out code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: ${{ github.sha }}
- name: Set up Go
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
with:
go-version-file: go.mod
- name: Disable default go problem matcher
run: echo "::remove-matcher owner=go::"
- name: Check out `certsuite-sample-workload`
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
repository: redhat-best-practices-for-k8s/certsuite-sample-workload
path: certsuite-sample-workload
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y python3-pip
- name: Setup up k8s cluster
uses: palmsoftware/[email protected]
with:
disableDefaultCni: true
numControlPlaneNodes: 1
numWorkerNodes: 2
installOLM: true
removeDefaultStorageClass: true
removeControlPlaneTaint: true
- name: Install partner resources
run: python3 -m venv .venv; source .venv/bin/activate; pip install --upgrade pip; pip install jinjanator; cp .venv/bin/jinjanate .venv/bin/j2; make install-for-qe
working-directory: certsuite-sample-workload
- name: Show pods
run: oc get pods -A
- name: Wait for all pods to be ready
run: ./scripts/wait-for-all-pods-running.sh
working-directory: certsuite-sample-workload
timeout-minutes: 10
- name: Clone the certsuite repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
repository: ${{ env.TEST_REPO }}
path: certsuite
ref: main
- name: Extract dependent Pull Requests
uses: depends-on/depends-on-action@61cb3f4a0e2c8ae4b90c9448dc57c7ba9ca24c35 # main
with:
token: ${{ secrets.GITHUB_TOKEN }}
extra-dirs: certsuite-sample-workload certsuite
- name: Run the tests (against image)
uses: nick-fields/retry@c97818ca39074beaea45180dba704f92496a0082 # v3.0.1
with:
timeout_minutes: 60
max_attempts: 3
command: FEATURES=${{matrix.suite}} CERTSUITE_REPO_PATH=${GITHUB_WORKSPACE}/certsuite CERTSUITE_IMAGE=${{env.TEST_CERTSUITE_IMAGE_NAME}} CERTSUITE_IMAGE_TAG=${{env.TEST_CERTSUITE_IMAGE_TAG}} DISABLE_INTRUSIVE_TESTS=true ENABLE_PARALLEL=true ENABLE_FLAKY_RETRY=true JOB_ID=${{github.run_id}} make test-features
# Only run against the binary during a scheduled run
- name: Build the binary
run: make build-certsuite-tool
working-directory: certsuite
- name: Run the tests (against binary)
uses: nick-fields/retry@c97818ca39074beaea45180dba704f92496a0082 # v3.0.1
with:
timeout_minutes: 60
max_attempts: 3
command: FEATURES=${{matrix.suite}} CERTSUITE_REPO_PATH=${GITHUB_WORKSPACE}/certsuite USE_BINARY=true DISABLE_INTRUSIVE_TESTS=true ENABLE_PARALLEL=true ENABLE_FLAKY_RETRY=true JOB_ID=${{github.run_id}} make test-features
check-all-dependencies-are-merged:
runs-on: ubuntu-22.04
steps:
- name: Extract dependent PR
uses: depends-on/depends-on-action@61cb3f4a0e2c8ae4b90c9448dc57c7ba9ca24c35 # main
with:
token: ${{ secrets.GITHUB_TOKEN }}
check-unmerged-pr: true
...