2727 - name : Fails in order to indicate that pull request needs to be marked as ready to review and unit tests workflow needs to pass.
2828 run : exit 1
2929
30- test :
31- runs-on : ubuntu-latest
32- steps :
33- - uses : actions/checkout@v4
34- with :
35- fetch-depth : 0
36- - uses : actions/setup-go@v5
37- with :
38- go-version : " 1.22"
39- - name : setup env
40- run : |
41- echo "GOPATH=$(go env GOPATH)" >> $GITHUB_ENV
42- echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
43- shell : bash
44- - name : Run linters
45- run : make install-golangci-lint lint
46- - name : Run tests
47- run : make test
48-
4930 test-integration :
5031 runs-on : ubuntu-latest
5132 steps :
6344 - uses : replicatedhq/action-k3s@main
6445 id : k3s
6546 with :
66- version : v1.24.1 -k3s1
67-
47+ version : v1.31.2 -k3s1
48+ # test-integration includes unit tests
6849 - run : make test-integration
6950
7051 ensure-schemas-are-generated :
@@ -104,54 +85,6 @@ jobs:
10485 name : preflight
10586 path : bin/preflight
10687
107- validate-preflight :
108- runs-on : ubuntu-latest
109- needs : compile-preflight
110- steps :
111- - uses : replicatedhq/action-k3s@main
112- id : k3s
113- with :
114- version : v1.23.6-k3s1
115- - name : Download preflight binary
116- uses : actions/download-artifact@v4
117- with :
118- name : preflight
119- path : bin/
120- - run : chmod +x bin/preflight
121- - run : |
122- set +e
123- ./bin/preflight --interactive=false --format=json https://preflight.replicated.com > result.json
124- EXIT_CODE=$?
125- cat result.json
126-
127- EXIT_STATUS=0
128- if [ $EXIT_CODE -ne 3 ]; then
129- echo "Expected exit code of 3 (some checks failed), got $EXIT_CODE"
130- EXIT_STATUS=1
131- fi
132-
133- if grep -q "was not collected" result.json; then
134- echo "Some files were not collected"
135- EXIT_STATUS=1
136- fi
137-
138- if (( `jq '.pass | length' result.json` < 1 )); then
139- echo "No passing preflights found"
140- EXIT_STATUS=1
141- fi
142-
143- if (( `jq '.warn | length' result.json` < 1 )); then
144- echo "No warnings found"
145- EXIT_STATUS=1
146- fi
147-
148- if (( `jq '.fail | length' result.json` < 1 )); then
149- echo "No failed preflights found"
150- EXIT_STATUS=1
151- fi
152-
153- exit $EXIT_STATUS
154-
15588 validate-preflight-e2e :
15689 runs-on : ubuntu-latest
15790 needs : compile-preflight
16093 - uses : replicatedhq/action-k3s@main
16194 id : k3s
16295 with :
163- version : v1.23.6 -k3s1
96+ version : v1.31.2 -k3s1
16497 - name : Download preflight binary
16598 uses : actions/download-artifact@v4
16699 with :
@@ -193,25 +126,6 @@ jobs:
193126 name : support-bundle
194127 path : bin/support-bundle
195128
196- validate-supportbundle :
197- runs-on : ubuntu-latest
198- needs : compile-supportbundle
199- steps :
200- - uses : actions/checkout@v4
201- - uses : replicatedhq/action-k3s@main
202- id : k3s
203- with :
204- version : v1.23.6-k3s1
205- - name : Download support-bundle binary
206- uses : actions/download-artifact@v4
207- with :
208- name : support-bundle
209- path : bin/
210- - run : chmod +x bin/support-bundle
211- - run : ./bin/support-bundle ./examples/support-bundle/sample-collectors.yaml
212- - run : ./bin/support-bundle ./examples/support-bundle/sample-supportbundle.yaml
213- - run : ./bin/support-bundle https://kots.io
214-
215129 validate-supportbundle-e2e :
216130 runs-on : ubuntu-latest
217131 needs : compile-supportbundle
@@ -220,27 +134,20 @@ jobs:
220134 - uses : replicatedhq/action-k3s@main
221135 id : k3s
222136 with :
223- version : v1.23.6 -k3s1
137+ version : v1.31.2 -k3s1
224138 - name : Download support bundle binary
225139 uses : actions/download-artifact@v4
226140 with :
227141 name : support-bundle
228142 path : bin/
229143 - run : chmod +x bin/support-bundle
230144 - run : make support-bundle-e2e-test
231-
232- validate-supportbundle-e2e-go-test :
233- runs-on : ubuntu-latest
234- needs : compile-supportbundle
235- steps :
236- - uses : actions/setup-go@v5
237- with :
238- go-version : " 1.22"
239- - name : setup env
240- run : |
241- echo "GOPATH=$(go env GOPATH)" >> $GITHUB_ENV
242- echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
243- shell : bash
145+
146+ # Additional e2e tests for support bundle that run in Go, these create a Kind cluster
147+ validate-supportbundle-e2e-go :
148+ runs-on : ubuntu-latest
149+ needs : compile-supportbundle
150+ steps :
244151 - uses : actions/checkout@v4
245152 - name : Download support bundle binary
246153 uses : actions/download-artifact@v4
@@ -308,9 +215,8 @@ jobs:
308215 goreleaser :
309216 runs-on : ubuntu-latest
310217 needs :
311- - validate-preflight
312218 - validate-preflight-e2e
313- - validate-supportbundle
219+ - validate-supportbundle-e2e
314220 if : startsWith(github.ref, 'refs/tags/v')
315221 steps :
316222 - name : Checkout
@@ -367,15 +273,12 @@ jobs:
367273 validate-pr-tests :
368274 runs-on : ubuntu-latest
369275 needs :
370- - test
371276 - test-integration
372277 - run-examples
373278 - compile-collect
374- - validate-preflight
375279 - validate-preflight-e2e
376- - validate-supportbundle
377280 - validate-supportbundle-e2e
378- - validate-supportbundle-e2e-go-test
281+ - validate-supportbundle-e2e-go
379282 - ensure-schemas-are-generated
380283 steps :
381284 - run : echo "All PR tests passed"
0 commit comments