-
Notifications
You must be signed in to change notification settings - Fork 11
65 lines (62 loc) · 2 KB
/
kind_e2e.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
name: Kind E2E Tests
on:
pull_request:
branches:
- main
- release-*
push:
branches:
- main
- release-*
env:
KIND_VERSION: v0.22.0
jobs:
check-changes:
name: Check whether tests need to be run based on diff
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: antrea-io/has-changes@v2
id: check_diff
with:
paths-ignore: docs/* *.md
outputs:
has_changes: ${{ steps.check_diff.outputs.has_changes }}
e2e-tests:
name: Run e2e tests using Kind
needs: check-changes
if: ${{ needs.check-changes.outputs.has_changes == 'yes' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build container images
run: make
- name: Install Kind
run: |
curl -Lo ./kind https://github.com/kubernetes-sigs/kind/releases/download/${KIND_VERSION}/kind-$(uname)-amd64
chmod +x ./kind
sudo mv kind /usr/local/bin
- name: Create Kind cluster
run: |
kind create cluster --config ci/kind-config.yml
kind load docker-image antrea/antrea-ui-frontend
kind load docker-image antrea/antrea-ui-backend
- name: Install Antrea
run: |
helm repo add antrea https://charts.antrea.io
helm repo update
helm install --namespace kube-system antrea antrea/antrea
kubectl rollout status -n kube-system ds/antrea-agent --timeout=5m
# For e2e helm tests, Antrea UI should not be installed
- name: Run e2e helm tests
run: go test -v ./test/e2e_helm
# We install Antrea UI with extra features enabled (e.g., OIDC) for better test coverage
- name: Install Antrea UI
run: |
helm install --namespace kube-system antrea-ui -f ci/antrea-ui-values.yml ./build/charts/antrea-ui
kubectl rollout status -n kube-system deployment/antrea-ui --timeout=5m
# For e2e tests, Antrea UI should be installed first
- name: Run e2e tests
run: go test -v ./test/e2e