-
Notifications
You must be signed in to change notification settings - Fork 1
113 lines (108 loc) · 2.63 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
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
name: ci
on:
push:
tags:
- v*
pull_request:
jobs:
unit-tests:
name: Codegen And Unit Tests
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Go
uses: actions/setup-go@v3
with:
go-version-file: './go.mod'
check-latest: true
cache: true
- name: Install Dependencies
run: make install_dependencies
- name: Check Code Generation
run: make check_codegen
env:
GOPATH: /home/runner/go
- name: Run Unit Tests
run: make unit_tests
lint-code:
name: Lint code
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Go
uses: actions/setup-go@v3
with:
go-version-file: './go.mod'
check-latest: true
cache: true
- name: Run Linter
uses: golangci/golangci-lint-action@v3
with:
version: v1.48.0
args: --timeout 5m
lint-docs:
name: Lint docs
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Run Missspell
uses: reviewdog/action-misspell@v1
with:
locale: "US"
level: "info"
pattern: |
*.md
exclude: |
./.git/*
e2e-tests:
name: e2e Test Suite
runs-on: ubuntu-22.04
strategy:
matrix:
k3sVersion:
- "v1.25.0-k3s1"
- "v1.24.4-k3s1"
- "v1.23.10-k3s1"
- "v1.22.13-k3s1"
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Go
uses: actions/setup-go@v3
with:
go-version-file: './go.mod'
check-latest: true
cache: true
- name: Install google/ko
uses: imjasonh/[email protected]
- name: Install helm
uses: azure/setup-helm@v3
with:
version: v3.9.3
- name: Install k3d
uses: rinx/[email protected]
with:
version: v5.4.4
skipClusterCreation: true
- name: Patch /etc/hosts
run: |
echo "127.0.0.1 kudo-e2e-registry.localhost" | sudo tee -a /etc/hosts
- name: Run The e2e Test Suite
run: make e2e_tests
env:
K3S_VERSION: ${{ matrix.k3sVersion }}
release:
name: Release
runs-on: ubuntu-22.04
if: startsWith(github.ref, 'refs/tags/')
needs:
- unit-tests
- lint-code
- lint-docs
- e2e-tests
steps:
- name: Release a New Version
run: echo "do this when there's something to release!"