-
Notifications
You must be signed in to change notification settings - Fork 212
91 lines (91 loc) · 3.02 KB
/
Copy pathe2e.yaml
File metadata and controls
91 lines (91 loc) · 3.02 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
name: e2e
on:
workflow_dispatch:
pull_request:
push:
branches:
- "main"
- "release/**"
jobs:
test:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- name: Setup Go
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version: 1.26.x
cache-dependency-path: |
**/go.sum
**/go.mod
- name: Run tests
run: make test
- name: Check if working tree is dirty
run: make verify
kind:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Test suite setup
uses: fluxcd/gha-workflows/.github/actions/setup-kubernetes@526a0ab488375330ba526c26584ae22ee270d5b6 # v0.11.0
with:
go-version: 1.26.x
- name: Build container image
run: |
make docker-build IMG=test/helm-controller:latest \
BUILD_PLATFORMS=linux/amd64 \
BUILD_ARGS="--load"
- name: Load test image
run: kind load docker-image test/helm-controller:latest
- name: Install CRDs
run: make install
- name: Run default status test
run: |
kubectl apply -f config/testdata/status-defaults
RESULT=$(kubectl get helmrelease status-defaults -o go-template={{.status}})
EXPECTED='map[observedGeneration:-1]'
if [ "${RESULT}" != "${EXPECTED}" ] ; then
echo -e "${RESULT}\n\ndoes not equal\n\n${EXPECTED}"
exit 1
fi
- name: Deploy controllers
run: |
make dev-deploy IMG=test/helm-controller:latest
kubectl -n helm-system rollout status deploy/source-controller --timeout=1m
kubectl -n helm-system rollout status deploy/helm-controller --timeout=1m
env:
KUBEBUILDER_ASSETS: ${{ github.workspace }}/kubebuilder/bin
- name: Install sources
run: |
kubectl -n helm-system apply -f config/testdata/sources
- parallel:
- name: Run smoke tests
run: |
bash -e hack/ci/e2e/smoke.sh
- name: Run SSA tests
run: |
bash -e hack/ci/e2e/ssa.sh
- name: Run lifecycle tests
run: |
bash -e hack/ci/e2e/lifecycle.sh
- name: Run advanced tests
run: |
bash -e hack/ci/e2e/advanced.sh
- name: Logs
if: always()
continue-on-error: true
run: |
kubectl -n helm-system logs deploy/source-controller
kubectl -n helm-system logs deploy/helm-controller
- name: Debug failure
if: failure()
run: |
kubectl -n helm-system get helmrepositories -oyaml || true
kubectl -n helm-system get helmcharts -oyaml || true
kubectl -n helm-system get helmreleases -oyaml || true
kubectl -n helm-system get all
helm ls -n helm-system --all