-
Notifications
You must be signed in to change notification settings - Fork 16
85 lines (73 loc) · 1.71 KB
/
kind.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
name: KinD tests
on:
pull_request:
branches:
- main
defaults:
run:
shell: bash
working-directory: discovery
jobs:
kind-tests:
runs-on: ubuntu-latest
env:
REGISTRY: localhost:5000
strategy:
matrix:
go:
- '1.22.4'
kind:
- 'latest'
name: KinD tests
steps:
- name: Checkout Discovery
uses: actions/checkout@v2
with:
path: discovery
fetch-depth: 0 # Fetch all history for all tags and branches
- name: Set up Go - ${{ matrix.go }}
uses: actions/setup-go@v2
id: go
with:
go-version: ${{ matrix.go }}
- name: Verify modules
run: |
go mod verify
- name: Verify format
run: |
make fmt
git diff --exit-code
- name: Unit Tests
run: |
make test
- name: Create K8s KinD Cluster - ${{ matrix.kind }}
env:
KIND_VERSION: ${{ matrix.kind }}
run: |
make kind-create-cluster
- name: Build and Push Image to KinD node
env:
TAG: ${{ github.sha }}
run: |
make docker-build
make server-docker-build
make kind-load-image
make kind-load-testserver-image
# TODO: Re-enable test case
# - name: Deploy to KinD
# env:
# TAG: ${{ github.sha }}
# run: |
# make kind-deploy-controller
# make kind-deploy-testserver
# - name: Integration Tests
# run: |
# make integration-tests
# - name: Debug
# if: ${{ failure() }}
# run: |
# make kind-debug
- name: Clean up cluster
if: ${{ always() }}
run: |
make kind-delete-cluster