-
Notifications
You must be signed in to change notification settings - Fork 4
73 lines (69 loc) · 1.68 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
name: CI
on:
push:
branches:
- "main"
paths:
- '**'
- '!docs/**'
pull_request:
branches:
- "main"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
tests:
name: Unit Tests
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: "1.20"
cache: true
- run: make test
lint:
name: Go Lint
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: '1.20'
cache: true
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.53
only-new-issues: true
skip-pkg-cache: true
args: --timeout=10m
helm:
name: Helm Lint
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Check Git diff in /helm-chart
run: |
if [ "$(git diff --exit-code --name-only --diff-filter=d origin/main -- helm-chart/)" != "" ]; then
echo "There are Git diffs in the /helm-chart folder."
echo "CHART_UPDATED=true" >> $GITHUB_ENV
else
echo "There are no Git diffs in the /helm-chart folder."
fi
- name: Install Helm Docs
uses: envoy/[email protected]
with:
version: 1.11.0
- name: Helm lint and template
run: |
make helm
if: ${{ env.CHART_UPDATED }}