-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (62 loc) · 1.48 KB
/
ci.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
64
65
66
67
name: CI
on:
push:
branches:
- master
pull_request_review:
types: [submitted]
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: set up Go
uses: actions/setup-go@v5
with:
go-version: '1.20'
- name: build
run: go build -buildvcs=false -v ./...
test-unit:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v4
- name: set up Go
uses: actions/setup-go@v5
with:
go-version: '1.20'
- name: test packages
run: go test -coverpkg ./internal/... ./tests/unit/...
test-k8s:
strategy:
fail-fast: false
matrix:
version:
- v1.29.0
- v1.28.0
- v1.27.3
- v1.26.6
- v1.25.11
runs-on: ubuntu-latest
if: ${{ (github.event.review.state == 'approved') || github.ref == 'refs/heads/master' }}
name: test-e2e-k8s-${{ matrix.version }}
needs:
- build
steps:
- uses: actions/checkout@v4
- name: set up Go
uses: actions/setup-go@v5
with:
go-version: '1.20'
- name: create k8s Kind cluster
uses: helm/[email protected]
with:
node_image: kindest/node:${{ matrix.version }}
cluster_name: cluster-${{ matrix.version }}
config: testutils/kind.yaml
version: v0.20.0
- name: test controllers
run: go test -coverpkg ./controllers/... ./tests/e2e/controller/...