-
Notifications
You must be signed in to change notification settings - Fork 17
96 lines (93 loc) · 2.38 KB
/
ci.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
name: ci/github
on:
pull_request:
branches: [ main ]
push:
branches: [ main ]
permissions:
contents: read
jobs:
unit:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: 1.20.x
cache: true
check-latest: true
- name: Build
run: make build
- name: Test
run: make test
verify:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: 1.20.x
cache: true
check-latest: true
- name: Verify fmt
run: make verify-fmt
- name: Verify generated code
run: make verify-generate
- name: Verify generated manifests
run: make verify-manifests
- name: Verify OLM bundle
run: make verify-bundle
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v2
with:
args: --timeout=10m
e2e:
strategy:
fail-fast: false
matrix:
kubernetes:
- v1.23.13
max-parallel: 2
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: 1.20.x
cache: true
check-latest: true
- name: Install kubectl
uses: azure/setup-kubectl@v3
with:
version: ${{ matrix.kubernetes }}
- name: Deploy KinD Local Container Registry
run: make deploy-kind-registry
- name: Create KinD cluster
uses: helm/kind-action@v1
with:
version: v0.17.0
node_image: kindest/node:${{ matrix.kubernetes }}
cluster_name: kind
config: test/kind/config.yaml
wait: 120s
- name: Verify KinD cluster
run: make verify-kind
- name: Install KinD post-actions
run: make deploy-kind-registry-post
- name: Install OLM
run: make install-olm
# Builds the operator and makes the image readable in the KinD cluster
- name: Build Operator Bundle
run: |
make bundle-push IMAGE_REPO=localhost:5000
- name: Build Catalog Source
run: |
make catalog-push IMAGE_REPO=localhost:5000 OPM_USE_HTTP=true
- name: Run Operator with Catalog
run: make catalog-run IMAGE_REPO=localhost:5000