This repository has been archived by the owner on Jul 16, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 90
90 lines (81 loc) · 2.35 KB
/
e2e_tests.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
name: e2e tests
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
setup:
name: setup
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
- name: setup Go
uses: actions/setup-go@v3
with:
go-version-file: go.work
- name: Install dependencies
run: |
go version
go install golang.org/x/lint/golint@master
e2e:
name: e2e
needs: setup
runs-on: ubuntu-latest
timeout-minutes: 100
strategy:
fail-fast: false
matrix:
ipFamily: ["ipv4", "ipv6", "dual"]
backend: ["iptables", "ipvs", "nft", "ebpf", "userspacelin"]
exclude:
- ipFamily: "ipv6"
backend: "ebpf"
- ipFamily: "dual"
backend: "ebpf"
- ipFamily: "ipv6"
backend: "userspacelin"
- ipFamily: "dual"
backend: "userspacelin"
env:
JOB_NAME: "kpng-e2e-${{ matrix.ipFamily }}-${{ matrix.backend }}"
IP_FAMILY: ${{ matrix.ipFamily }}
BACKEND: ${{ matrix.backend }}
steps:
- name: checkout
uses: actions/checkout@v3
- name: setup ebpf backend dependencies
run: |
if [[ ${{ env.BACKEND }} == "ebpf" ]]; then
export GOBIN=$(go env GOPATH)/bin
export PATH=$PATH:$GOBIN
echo "PATH=$PATH" >> $GITHUB_ENV
go install github.com/cilium/ebpf/cmd/[email protected]
sudo apt-get update && sudo apt-get install -y clang llvm libelf-dev libpcap-dev gcc-multilib build-essential
fi
- name: run e2e tests
run: ./hack/test_e2e.sh -i ${{ env.IP_FAMILY }} -b ${{ env.BACKEND }} -c -n 1 -S
- name: Export logs
if: always()
run: |
./hack/e2e_export_logs.sh
- name: Upload Junit Reports
if: always()
uses: actions/upload-artifact@v3
with:
name: kind-junit-${{ env.JOB_NAME }}-${{ github.run_id }}
path: './temp/e2e/artifacts/reports/*.xml'
- name: Upload logs
if: always()
uses: actions/upload-artifact@v3
with:
name: kind-logs-${{ env.JOB_NAME }}-${{ github.run_id }}
path: ./hack/temp/e2e/artifacts/logs/
- name: Publish Test Report
uses: mikepenz/action-junit-report@v3
if: always()
with:
report_paths: './temp/e2e/artifacts/reports/*.xml'