-
Notifications
You must be signed in to change notification settings - Fork 17
104 lines (97 loc) · 3.09 KB
/
build-integration.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
92
93
94
95
96
97
98
99
100
101
102
103
104
---
name: build-integration
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
on:
pull_request:
branches:
- master
types:
- opened
- reopened
- synchronize
- ready_for_review
push:
branches:
- master
workflow_dispatch:
jobs:
check-generated-resources:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: actions/setup-go@v4
with:
go-version: 1.20.5
- uses: actions/setup-node@v3
with:
node-version: 10
- name: Install prettier
run: |
sudo apt install -y nodejs npm
npm install -g prettier
- name: Ensure generated CRDs and manifests are up to date
run: make manifests && git diff --exit-code config/
vet:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: actions/setup-go@v4
with:
go-version: 1.20.5
- name: Ensure no go vet errors
run: |
make vet
unit-integration:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: actions/setup-go@v4
with:
go-version: 1.20.5
- name: Install go tooling and setup-envtest
run: |
make install-tools
- name: Run tests
run: |
export KUBEBUILDER_ASSETS="$(setup-envtest use -p path 1.24.x!)"
ginkgo -race -randomizeSuites -randomizeAllSpecs -r ./...
acceptance:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: actions/setup-go@v4
with:
go-version: 1.20.5
- name: Build test binaries
run: make bin/acceptance.linux
- name: Install tooling
run: |-
sudo bash <<EOF
curl -fsL -o /usr/local/bin/kind https://github.com/kubernetes-sigs/kind/releases/download/v0.19.0/kind-linux-amd64
curl -fsL https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize%2Fv4.4.1/kustomize_v4.4.1_linux_amd64.tar.gz \
| tar xfz -
mv -v kustomize /usr/local/bin/kustomize
curl -fsL -o /usr/local/bin/kubectl https://storage.googleapis.com/kubernetes-release/release/v1.24.11/bin/linux/amd64/kubectl
chmod a+x /usr/local/bin/kustomize /usr/local/bin/kubectl /usr/local/bin/kind
EOF
- name: Prepare the cluster
run: bin/acceptance.linux prepare --verbose && sleep 10
- name: Run acceptance tests
run: bin/acceptance.linux run --verbose
- name: Show all pods
run: kubectl get pods -A -o wide
if: failure()
- name: Show events
run: kubectl get events
if: failure()
- name: Show workloads logs
run: kubectl -n theatre-system logs theatre-workloads-manager-0
if: failure()
- name: Show rbac logs
run: kubectl -n theatre-system logs theatre-rbac-manager-0
if: failure()
- name: Show vault manager logs
run: kubectl -n theatre-system logs theatre-vault-manager-0
if: failure()