forked from kcp-dev/kcp
-
Notifications
You must be signed in to change notification settings - Fork 0
117 lines (99 loc) · 3.44 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
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
name: CI
on:
push:
branches:
- main
- 'release-*'
pull_request:
branches:
- main
- 'release-*'
paths-ignore:
- "docs/**"
- "**/*.md"
- ".github/ISSUE_TEMPLATE/*"
- ".goreleaser.yaml"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# NOTE!!!
#
# If you add a job here that is a REQUIRED status check in GitHub, you MUST add a job with the same name to ci-docs-only.yaml
#
# NOTE!!!
env:
# etcd uses fsync by default, disable it for running on github actions to avoid disk contention
# xref: https://github.com/kcp-dev/kcp/pull/435/commits/064a517747d69c2cd8f7f8b4a595ad909e595c89
UNSAFE_E2E_HACK_DISABLE_ETCD_FSYNC: true
# always enable the Kubernetes cache mutation detector when running in CI, this guarantees to catch
# potentiall issues with controllers not properly copying objects before mutating them.
KUBE_CACHE_MUTATION_DETECTOR: true
jobs:
e2e-shared-server:
name: e2e-shared-server
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: v1.19
cache: true
- run: make build
# Install kind with a local registry
- uses: container-tools/kind-action@v2
name: Kubernetes KinD Cluster w/local registry
with:
version: v0.17.0
config: test/e2e/kind/config-calico.yaml
# Install Calico
- run: |-
kubectl apply -f https://raw.githubusercontent.com/projectcalico/calico/release-v3.24/manifests/calico.yaml
kubectl -n kube-system set env daemonset/calico-node FELIX_IGNORELOOSERPF=true
# Install ko
- run: |-
go install github.com/google/ko@latest
# wait for Calico to be ready
- run: |-
kubectl wait pods -n kube-system -l k8s-app=calico-node --for=condition=Ready --timeout=90s
- run: |-
LOG_DIR=/tmp/e2e/shared-server/artifacts ARTIFACT_DIR=/tmp/e2e COUNT=2 SUITES=transparent-multi-cluster:requires-kind \
make test-e2e-shared
- uses: cytopia/[email protected]
if: ${{ always() }}
with:
name: e2e-shared-server
path: /tmp/e2e/**/artifacts/
e2e-sharded:
name: e2e-sharded
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: v1.19
cache: true
- run: make build
# Install kind with a local registry
- uses: container-tools/kind-action@v2
name: Kubernetes KinD Cluster w/local registry
with:
version: v0.17.0
config: test/e2e/kind/config-calico.yaml
# Install Calico
- run: |-
kubectl apply -f https://raw.githubusercontent.com/projectcalico/calico/release-v3.24/manifests/calico.yaml
kubectl -n kube-system set env daemonset/calico-node FELIX_IGNORELOOSERPF=true
# Install ko
- run: |-
go install github.com/google/ko@latest
# wait for Calico to be ready
- run: |-
kubectl wait pods -n kube-system -l k8s-app=calico-node --for=condition=Ready --timeout=90s
- run: |-
LOG_DIR=/tmp/e2e/sharded/artifacts ARTIFACT_DIR=/tmp/e2e COUNT=2 SUITES=transparent-multi-cluster:requires-kind \
make test-e2e-sharded
- uses: cytopia/[email protected]
if: ${{ always() }}
with:
name: e2e-sharded
path: /tmp/e2e/**/artifacts/