-
Notifications
You must be signed in to change notification settings - Fork 115
91 lines (74 loc) · 2.49 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
---
name: CI
on:
push:
branches: [main]
pull_request:
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.x
- uses: actions/cache@v4
with:
path: ~/.cache/golangci-lint
key: pre-commit-golangci-lint|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }}|${{ hashFiles('**/*.go') }}
restore-keys: |
pre-commit-golangci-lint|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }}|
pre-commit-golangci-lint|${{ env.pythonLocation }}|
pre-commit-golangci-lint|
- uses: pre-commit/[email protected]
test:
name: Unit Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- run: go test -v -race -coverprofile=coverage.txt ./...
- uses: codecov/codecov-action@v5
if: >
!startsWith(github.head_ref, 'renovate/') &&
!startsWith(github.head_ref, 'releaser-pleaser--')
with:
token: ${{ secrets.CODECOV_TOKEN }}
deploy-manifests:
name: Check deployment manifests
runs-on: ubuntu-latest
steps:
- uses: yokawasa/[email protected]
with:
setup-tools: |
helm
helm: v3.11.2
- uses: actions/checkout@v4
- name: Generate manifests from helm chart
run: scripts/update-deployment-yamls.sh
- name: Check for diff
run: git diff --exit-code -- deploy/
- name: Show warning
if: ${{ failure() }}
run: echo "::error title=Deployment Manifests outdated::Please run scripts/update-deployment-yamls.sh and commit the changes to deploy/"
helm-chart:
name: Verify snapshots
runs-on: ubuntu-latest
steps:
- uses: yokawasa/[email protected]
with:
setup-tools: |
helm
helm: v3.16.4 # renovate: datasource=github-releases depName=helm/helm
- uses: actions/checkout@v4
- name: Verify
run: |
scripts/update-helm-snapshots.sh
git diff --exit-code -- chart/.snapshots/
- name: Show warning
if: failure()
run: echo "::error title=Helm Snapshots outdated::Please run hack/update-helm-snapshots.sh and commit the changes to chart/.snapshots/"
- name: Helm Lint
run: helm lint chart/