-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (49 loc) · 1.52 KB
/
test-examples.yml
File metadata and controls
59 lines (49 loc) · 1.52 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
name: Test Examples
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
# Allow manual triggering
workflow_dispatch:
jobs:
examples-test:
name: Test example VirtualClusters
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'
cache: true
- name: Setup Kind
uses: helm/kind-action@v1.13.0
with:
wait: 300s
cluster_name: kind
- name: Install CRDs
run: |
make install
- name: Build and load controller image
run: |
make docker-build docker-push IMG=openvirtualcluster-operator:test
kind load docker-image openvirtualcluster-operator:test --name kind
- name: Deploy controller
run: |
make deploy IMG=openvirtualcluster-operator:test
- name: Wait for controller to be ready
run: |
kubectl wait --for=condition=available --timeout=300s deployment/openvirtualcluster-controller-manager -n openvirtualcluster-system
- name: Run example tests
run: |
go test -v ./test/e2e/examples_test.go -ginkgo.v
- name: Collect logs on failure
if: failure()
run: |
kubectl logs -n openvirtualcluster-system -l control-plane=controller-manager --tail=100
kubectl get pods -A
kubectl get virtualclusters -A