-
Notifications
You must be signed in to change notification settings - Fork 0
114 lines (94 loc) · 2.47 KB
/
ci.yml
File metadata and controls
114 lines (94 loc) · 2.47 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
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
env:
GO_VERSION: "1.26"
GOLANGCI_LINT_VERSION: "v2.8.0"
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version: ${{ env.GO_VERSION }}
- name: golangci-lint
uses: golangci/golangci-lint-action@v9
with:
version: ${{ env.GOLANGCI_LINT_VERSION }}
args: --timeout=5m
- name: Hadolint
uses: hadolint/hadolint-action@v3.3.0
with:
dockerfile: Dockerfile
- name: yamllint
uses: ibiqlik/action-yamllint@v3
with:
file_or_dir: |
deploy/helm/zelyo-operator/Chart.yaml
deploy/helm/zelyo-operator/values.yaml
deploy/helm/zelyo-policies/Chart.yaml
deploy/helm/zelyo-policies/values.yaml
.github/workflows/
config_data: |
extends: default
rules:
line-length:
max: 200
truthy:
check-keys: false
comments-indentation: disable
document-start: disable
test:
name: Test
runs-on: ubuntu-latest
needs: lint
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version: ${{ env.GO_VERSION }}
- name: Run tests
run: make test
- name: Upload coverage
uses: codecov/codecov-action@v6
with:
file: cover.out
fail_ci_if_error: false
build:
name: Build
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version: ${{ env.GO_VERSION }}
- name: Build binary
run: make build
- name: Build Docker image
run: make docker-build IMG=ghcr.io/zelyo-ai/zelyo-operator:ci-${{ github.sha }}
helm-lint:
name: Helm Lint
runs-on: ubuntu-latest
strategy:
matrix:
chart:
- deploy/helm/zelyo-operator
- deploy/helm/zelyo-policies
steps:
- uses: actions/checkout@v6
- name: Set up Helm
uses: azure/setup-helm@v5
with:
version: v3.16.0
- name: Helm lint
run: helm lint ${{ matrix.chart }}/
- name: Helm template
run: helm template test-release ${{ matrix.chart }}/ --debug