forked from helmfile/helmfile
-
Notifications
You must be signed in to change notification settings - Fork 0
151 lines (144 loc) · 4.93 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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
name: Go
on:
push:
branches: [ main ]
paths-ignore: [ '**.md', '**/docs/**' ]
pull_request:
branches: [ main ]
paths-ignore: [ '**.md', '**/docs/**' ]
jobs:
lint:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: false
- uses: golangci/golangci-lint-action@v6
with:
version: v1.61.0
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Build
run: make build build-test-tools
- name: Test
run: make check test
- name: Archive built binaries
run: tar -cvf built-binaries.tar helmfile diff-yamls dyff
- uses: actions/upload-artifact@v4
with:
name: built-binaries-${{ github.run_id }}
path: built-binaries.tar
retention-days: 1
- name: Display built binaries
run: ls -l helmfile diff-yamls dyff
integration_tests:
needs: tests
runs-on: ubuntu-latest
strategy:
matrix:
include:
# Helm maintains the latest minor version only and therefore each Helmfile version supports 2 Helm minor versions.
# That's why we cover only 2 Helm minor versions in this matrix.
# See https://github.com/helmfile/helmfile/pull/286#issuecomment-1250161182 for more context.
- helm-version: v3.16.4
kustomize-version: v5.2.1
plugin-secrets-version: 3.15.0
plugin-diff-version: 3.8.1
extra-helmfile-flags: ''
v1mode: ''
- helm-version: v3.16.4
kustomize-version: v5.4.3
# We assume that the helm-secrets plugin is supposed to
# work with the two most recent helm minor versions.
# Once it turned out to be not practically true,
# we will mark this combination as failable,
# and instruct users to upgrade helm and helm-secrets at once.
plugin-secrets-version: 4.6.0
plugin-diff-version: 3.9.14
extra-helmfile-flags: ''
v1mode: ''
- helm-version: v3.17.0
kustomize-version: v5.2.1
plugin-secrets-version: 3.15.0
plugin-diff-version: 3.8.1
extra-helmfile-flags: ''
v1mode: ''
- helm-version: v3.17.0
kustomize-version: v5.4.3
plugin-secrets-version: 4.6.0
plugin-diff-version: 3.9.14
extra-helmfile-flags: ''
v1mode: ''
# Helmfile v1
- helm-version: v3.17.0
kustomize-version: v5.4.3
plugin-secrets-version: 4.6.0
plugin-diff-version: 3.9.14
extra-helmfile-flags: ''
v1mode: 'true'
# In case you need to test some optional helmfile features,
# enable it via extra-helmfile-flags below.
- helm-version: v3.17.0
kustomize-version: v5.4.3
plugin-secrets-version: 4.6.0
plugin-diff-version: 3.9.14
extra-helmfile-flags: '--enable-live-output'
v1mode: ''
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- uses: actions/download-artifact@v4
with:
name: built-binaries-${{ github.run_id }}
- name: Extract tar to get built binaries
run: tar -xvf built-binaries.tar
- name: Display built binaries
run: ls -l helmfile diff-yamls dyff
- name: Install test dependencies
env:
HELM_VERSION: ${{ matrix.helm-version }}
KUSTOMIZE_VERSION: ${{ matrix.kustomize-version }}
run: make -C .github/workflows helm vault sops kustomize
- name: Start minikube
uses: medyagh/setup-minikube@latest
- name: Execute integration tests
run: make integration
env:
HELM_SECRETS_VERSION: ${{ matrix.plugin-secrets-version }}
HELM_DIFF_VERSION: ${{ matrix.plugin-diff-version }}
HELMFILE_HELM3: 1
TERM: xterm
EXTRA_HELMFILE_FLAGS: ${{ matrix.extra-helmfile-flags }}
HELMFILE_V1MODE: ${{ matrix.v1mode }}
e2e_tests:
needs: tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/download-artifact@v4
with:
name: built-binaries-${{ github.run_id }}
- name: Extract tar to get built binaries
run: tar -xvf built-binaries.tar
- name: Display built binaries
run: ls -l helmfile diff-yamls dyff
- name: Install package
run: sudo apt-get -y install expect
- name: Run helmfile init
run: bash test/e2e/helmfile-init/init_linux.sh
env:
TERM: xterm