-
Notifications
You must be signed in to change notification settings - Fork 13
63 lines (52 loc) · 1.52 KB
/
test.yaml
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
name: Tests
on:
pull_request:
branches:
- main
push:
branches:
- main
jobs:
go-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with: { go-version: stable }
- run: make check
- run: make check-cli-docs
kuttl-test:
runs-on: ubuntu-latest
needs: [go-test]
strategy:
fail-fast: false
matrix:
kubernetes: [v1.27, v1.24, v1.21]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with: { go-version: stable }
- name: Start k3s
uses: ./.github/actions/k3d
with:
k3s-channel: "${{ matrix.kubernetes }}"
- name: Build CLI
run: make build
- name: Create operator namespace
run: kubectl create namespace postgres-operator
- name: Install Operator
run: |
helm install pgo oci://registry.developers.crunchydata.com/crunchydata/pgo \
-n postgres-operator \
--set disable_check_for_upgrades=True
- name: Use bash, so we can use double square-bracket [[ syntax in our scripts
run: |
sudo ln -s bash /bin/sh.bash
sudo mv /bin/sh.bash /bin/sh
- name: Install kuttl
run: |
curl -Lo /usr/local/bin/kubectl-kuttl https://github.com/kudobuilder/kuttl/releases/download/v0.15.0/kubectl-kuttl_0.15.0_linux_x86_64
chmod +x /usr/local/bin/kubectl-kuttl
- name: Run kuttl
run: |
make check-kuttl