-
Notifications
You must be signed in to change notification settings - Fork 22
68 lines (57 loc) · 2.32 KB
/
nightly-tests.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
name: nightly tests
on:
schedule:
- cron: "0 0 * * *"
jobs:
nightly-test:
name: Nightly test
runs-on: ubuntu-latest
steps:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.21'
- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
# Username used to log in to a Docker registry. If not set then no login will occur
username: ${{ github.repository_owner }}
# Password or personal access token used to log in to a Docker registry. If not set then no login will occur
password: ${{ secrets.GHCR_AUTH_PAT }}
# Server address of Docker registry. If not set then will default to Docker Hub
registry: ghcr.io
# homebrew (+ gcc etc.) removed from $PATH on Ubuntu images.
# https://github.com/actions/runner-images/issues/6283
- name: Setup Homebrew
uses: Homebrew/actions/setup-homebrew@master
- name: Setup Env
run: sudo apt-get install gcc-11 g++ binutils libc6
- name: Install operator-sdk
run: brew install operator-sdk
- name: Download opm
run: |
version=1.26.1
curl -L https://github.com/operator-framework/operator-registry/releases/download/v${version}/linux-amd64-opm --output opm
sudo chmod +x opm
sudo mv opm /usr/bin
- name: Run functionality tests
run: make test-functionality
- name: Run audit flags tests
run: make test-audit || { sleep 30; make test-audit; }
- name: Setup test environment for deployment tests
run: |
kind create cluster
OLM_VERSION=$(curl -s https://api.github.com/repos/operator-framework/operator-lifecycle-manager/releases/latest | jq -r .tag_name)
curl -L https://github.com/operator-framework/operator-lifecycle-manager/releases/download/$OLM_VERSION/install.sh -o install.sh
chmod +x install.sh
./install.sh $OLM_VERSION
- name: Build and deploy KEDA olm operator index for deployment testing
run: |
kubectl create namespace keda
make deploy-olm-testing
- name: Run deployment tests
run: make test-deployment