-
Notifications
You must be signed in to change notification settings - Fork 0
84 lines (82 loc) · 2.18 KB
/
ci.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
name: ci
on: [push, pull_request]
env:
CARGO_TERM_COLOR: always
TAGS: dev
go-version: "1.21"
jobs:
unit-test:
name: Unit Test
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Setup Build Dependencies
run: make setup-grpc
- name: Fmt
run: make fmt
- name: Run Unit Test
run: make unit-test
integration-test:
name: Integration Test
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Setup Build Dependencies
run: make setup-grpc
- name: Install Kubernetes Dependencies
run: |-
make -C e2e setup
- name: Run Integration Test
run: make integration-test
bgp-e2e-test:
name: BGP End-to-End Test
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ env.go-version }}
- name: Build Image
run: make build-dev-image
- name: Setup Tools
working-directory: e2e
run: make setup
- name: Run E2E Test
working-directory: e2e
run: make bgp-e2e
kubernetes-e2e-test:
name: Kubernetes End-to-End Test
strategy:
matrix:
# kindest node version
kubernetes-version: ["1.26.4", "1.27.1", "1.28.0"]
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ env.go-version }}
- name: Build Image
run: make build-image
- name: Setup Tools
working-directory: e2e
run: |-
make setup
make -C ../ setup-grpc
- name: Start Kind Cluster
working-directory: e2e
run: make kubernetes KUBERNETES_VERSION=${{ matrix.kubernetes-version }}
- name: Generate Certificates
run: make certs
- name: Generate CRD
run: make crd
- name: Install sart
working-directory: e2e
run: make install-sart
- name: Run E2E Test
working-directory: e2e
run: make kubernetes-e2e
- name: Clean up Kind Cluster
working-directory: e2e
run: make kubernetes-down
if: always()