-
Notifications
You must be signed in to change notification settings - Fork 303
132 lines (118 loc) · 4.61 KB
/
compatibility-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
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
name: Compatibility E2E Test
on:
push:
branches: [main, release-*]
paths-ignore: ["**.md", "**.png", "**.jpg", "**.svg", "**/docs/**"]
pull_request:
branches: [main, release-*]
paths-ignore: ["**.md", "**.png", "**.jpg", "**.svg", "**/docs/**"]
schedule:
- cron: '0 4 * * *'
env:
KIND_VERSION: v0.12.0
CONTAINERD_VERSION: v1.5.2
KIND_CONFIG_PATH: test/testdata/kind/config.yaml
DRAGONFLY_CHARTS_PATH: deploy/helm-charts/charts/dragonfly
DRAGONFLY_CHARTS_CONFIG_PATH: test/testdata/charts/config-compatibility.yaml
DRAGONFLY_FILE_SERVER_PATH: test/testdata/k8s/file-server.yaml
DRAGONFLY_PROXY_SERVER_PATH: test/testdata/k8s/proxy.yaml
jobs:
compatibility_e2e_tests:
name: e2e_tests_with_${{ matrix.module }}
timeout-minutes: 60
runs-on: ubuntu-latest
strategy:
matrix:
module: ["manager", "scheduler", "dfdaemon", "seed-peer"]
include:
- module: manager
image: manager
image-tag: v2.0.9
chart-name: manager
- module: scheduler
image: scheduler
image-tag: v2.0.9
chart-name: scheduler
- module: dfdaemon
image: dfdaemon
image-tag: v2.0.2
chart-name: dfdaemon
- module: seed-peer
image: dfdaemon
image-tag: v2.0.9
chart-name: seedPeer
steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
# this might remove tools that are actually needed,
# if set to "true" but frees about 6 GB
tool-cache: false
# all of these default to true, but feel free to set to
# "false" if necessary for your workflow
android: true
dotnet: true
haskell: true
large-packages: true
docker-images: true
swap-storage: true
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Get dependencies
run: |
go install github.com/onsi/ginkgo/v2/ginkgo@v2.12.0
mkdir -p /tmp/artifact
go mod vendor
- name: Setup buildx
uses: docker/setup-buildx-action@v3
id: buildx
with:
install: true
- name: Setup Kind
uses: helm/kind-action@v1.8.0
with:
version: ${{ env.KIND_VERSION }}
config: ${{ env.KIND_CONFIG_PATH }}
cluster_name: kind
- name: Build images
run: |
hack/gen-buildx.sh
make docker-build docker-build-testing-tools
docker pull dragonflyoss/${{ matrix.image }}:${{ matrix.image-tag }}
make kind-load
kind load docker-image dragonflyoss/${{ matrix.image }}:${{ matrix.image-tag }}
- name: Setup dragonfly
run: |
helm install --wait --timeout 10m --dependency-update --create-namespace --namespace dragonfly-system --set ${{ matrix.chart-name }}.tag=${{ matrix.image-tag }} --set ${{ matrix.chart-name }}.image=dragonflyoss/${{ matrix.image }} -f ${{ env.DRAGONFLY_CHARTS_CONFIG_PATH }} dragonfly ${{ env.DRAGONFLY_CHARTS_PATH }}
kubectl apply -f ${{ env.DRAGONFLY_FILE_SERVER_PATH }}
kubectl apply -f ${{ env.DRAGONFLY_PROXY_SERVER_PATH }}
kubectl wait po file-server-0 --namespace dragonfly-e2e --for=condition=ready --timeout=10m
kubectl wait po file-server-no-content-length-0 --namespace dragonfly-e2e --for=condition=ready --timeout=10m
kubectl wait po proxy-0 --namespace dragonfly-e2e --for=condition=ready --timeout=10m
kubectl wait po proxy-1 --namespace dragonfly-e2e --for=condition=ready --timeout=10m
kubectl wait po proxy-2 --namespace dragonfly-e2e --for=condition=ready --timeout=10m
- name: Run Compatibility E2E test
env:
DRAGONFLY_COMPATIBILITY_E2E_TEST_MODE: ${{ matrix.module }}
DRAGONFLY_COMPATIBILITY_E2E_TEST_IMAGE: ${{ matrix.image }}
DRAGONFLY_STABLE_IMAGE_TAG: ${{ matrix.image-tag }}
run: make actions-e2e-test-coverage
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.txt
flags: ${{ matrix }}-compatibility-e2etests
- name: Upload Logs
uses: actions/upload-artifact@v4
if: always()
with:
name: ${{ matrix.module }}-compatibility-e2e-tests-logs
path: |
/tmp/artifact/**/*.log