-
Notifications
You must be signed in to change notification settings - Fork 326
137 lines (119 loc) · 3.28 KB
/
Copy pathmain.yaml
File metadata and controls
137 lines (119 loc) · 3.28 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
name: Main CI WorkFlow
on:
push:
branches:
- 'master'
- 'release-*'
tags:
- 'v*'
paths:
- ".github/workflows/main.yaml"
- ".github/workflows/build-op-image.yaml"
- "apis/**"
- "cmd/**"
- "controllers/**"
- "hack/**"
- "manifests/setup/setup.yaml"
- "tests/**"
- "pkg/**"
- "**/*.sh"
- "Makefile"
- "go.mod"
- "go.sum"
pull_request:
branches:
- 'master'
- 'release-*'
paths:
- ".github/workflows/main.yaml"
- ".github/workflows/build-op-image.yaml"
- "apis/**"
- "cmd/**"
- "controllers/**"
- "hack/**"
- "manifests/setup/setup.yaml"
- "tests/**"
- "pkg/**"
- "**/*.sh"
- "Makefile"
- "go.mod"
- "go.sum"
env:
KUBECTL_VERSION: v1.25.1
HELM_VERSION: v3.17.2
jobs:
basic_tests:
runs-on: ubuntu-22.04
timeout-minutes: 30
name: Basic test and verify
env:
GO111MODULE: "on"
steps:
- name: Checkout code
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
fetch-depth: 0
- name: Install Go
uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6.5.0
with:
go-version-file: go.mod
cache-dependency-path: go.sum
- name: Ensure all generated code is committed
run: |
make generate manifests docs-update
git diff --exit-code
- name: Check shell scripts
run: make shellcheck
- name: Go mod
run: |
GOPATH=$(go env GOPATH)
export PATH="$PATH:$GOPATH/bin"
go mod download
- name: Install kubebuilder
run: |
curl -L -o kubebuilder "https://github.com/kubernetes-sigs/kubebuilder/releases/download/v3.9.0/kubebuilder_linux_amd64"
chmod +x kubebuilder && mv kubebuilder /usr/local/bin/
- name: Run basic test
run: make test
- name: Run verify crds test
run: make verify
e2e_tests:
runs-on: ubuntu-22.04
timeout-minutes: 30
name: e2e tests
env:
GO111MODULE: "on"
steps:
- name: Checkout code
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
fetch-depth: 0
- name: Install Go
uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6.5.0
with:
go-version-file: go.mod
cache-dependency-path: go.sum
- name: Setup kubectl
uses: marcofranssen/setup-kubectl@8dd250ecabc2b05504337c1ff1ab4766f360742f # v2.1.0
with:
kubectlVersion: ${{ env.KUBECTL_VERSION }}
- name: Install dependences
run: make ginkgo kind
- name: Run e2e tests
run: make test-e2e
build:
runs-on: ubuntu-22.04
timeout-minutes: 30
name: Binary build
steps:
- name: Checkout code
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
fetch-depth: 0
- name: Install Go
uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6.5.0
with:
go-version-file: go.mod
cache-dependency-path: go.sum
- name: Run build all binaries
run: make binary