-
Notifications
You must be signed in to change notification settings - Fork 0
153 lines (151 loc) · 4.1 KB
/
e2e-test.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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
name: e2e test
on:
pull_request:
paths-ignore:
- '.gitignore'
- '.dockerignore'
- 'LICENSE'
- '**.md'
push:
branches:
- main
env:
CARGO_TERM_COLOR: always
TAGS: dev
go-version: "1.22"
jobs:
build-image:
name: Build container image
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Set up Docker buildx
uses: docker/setup-buildx-action@v3
- name: Build and Export
uses: docker/build-push-action@v5
with:
context: .
tags: sart:dev
outputs: type=docker,dest=/tmp/sart.tar
- name: Upload container image
uses: actions/upload-artifact@v4
with:
name: sart
path: /tmp/sart.tar
bgp-e2e-test:
name: BGP End-to-End Test
needs: build-image
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ env.go-version }}
- name: Download sart container image
uses: actions/download-artifact@v4
with:
name: sart
path: /tmp
- name: Load sart container image
run: |
docker load --input /tmp/sart.tar
docker image ls -a
- 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
needs: build-image
strategy:
matrix:
# kindest node version
kubernetes-version: ["1.28.6", "1.29.2"]
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ env.go-version }}
- name: Download sart container image
uses: actions/download-artifact@v4
with:
name: sart
path: /tmp
- name: Load sartd container image
run: |
docker load --input /tmp/sart.tar
docker image ls -a
- 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()
cni-e2e-test:
name: CNI End-to-End Test
needs: build-image
strategy:
matrix:
# kindest node version
kubernetes-version: ["1.28.6", "1.29.2"]
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ env.go-version }}
- name: Download sart container image
uses: actions/download-artifact@v4
with:
name: sart
path: /tmp
- name: Load sart container image
run: |
docker load --input /tmp/sart.tar
docker image ls -a
- name: Setup Tools
working-directory: e2e
run: |-
make setup
make -C ../ setup-grpc
- name: Start Kind Cluster
working-directory: e2e
run: make kubernetes MODE=cni COMPACT=true KUBERNETES_VERSION=${{ matrix.kubernetes-version }}
env:
MODE: cni
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 MODE=cni
env:
MODE: cni
- name: Run E2E Test
working-directory: e2e
run: make cni-e2e
- name: Clean up Kind Cluster
working-directory: e2e
run: make kubernetes-down MODE=cni COMPACT=true
if: always()