-
Notifications
You must be signed in to change notification settings - Fork 0
177 lines (156 loc) · 6.57 KB
/
Copy pathci.yml
File metadata and controls
177 lines (156 loc) · 6.57 KB
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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
name: ci
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
# SHAs pinned to latest tags as of 2026-05-22:
# actions/checkout@v6.0.2 de0fac2e4500dabe0009e67214ff5f5447ce83dd
# actions/setup-go@v6.4.0 4a3601121dd01d1626a1e23e37211e3254c1c06c
# actions/setup-node@v6.4.0 48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e
# actions/cache@v5.0.5 27d5ce7f107fe9357f9df03efb73ab90386fccae
# golangci-lint pinned in tools/go.mod via `tool` directive
env:
CGO_ENABLED: "1"
K3D_CLI_VERSION: v5.7.5
HELM_VERSION: v3.16.4
KUBECTL_VERSION: v1.31.6
jobs:
# ---------------------------------------------------------------------------
# lint: make format-check + make lint (covers root and examples modules)
# ---------------------------------------------------------------------------
lint:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version-file: go.mod
- run: make format-check
- run: make tidy && git diff --exit-code
- run: make lint
# ---------------------------------------------------------------------------
# test: make vet + make test (root) + examples unit tests
# ---------------------------------------------------------------------------
test:
name: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version-file: go.mod
- run: make vet
- run: make test
- name: example tests
run: |
make -C examples/hello test
make -C examples/sse-tap test
make -C examples/request-ui test
make -C examples/lb-policy test
make -C examples/cluster test
make -C examples/cluster-async-router test
make -C examples/cluster-dfp test
make -C examples/cluster-router test
make -C examples/cluster-shard-router test
make -C examples/spa test
# ---------------------------------------------------------------------------
# e2e: all integration test suites against dev Envoy
# Cache key is the hash of down/abi_impl/VERSION so the binary refreshes
# automatically whenever make update-sdk bumps the SDK commit.
# ---------------------------------------------------------------------------
e2e:
name: e2e
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version-file: go.mod
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: "24"
cache: npm
cache-dependency-path: examples/spa/e2e/package-lock.json
- name: cache envoy
id: cache-envoy
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: .bin/envoy
key: envoy-dev-${{ hashFiles('down/abi_impl/VERSION') }}-linux-amd64
- name: download envoy
if: steps.cache-envoy.outputs.cache-hit != 'true'
run: make download-envoy
- run: make e2e
- run: make -C examples/async-callout e2e
- run: make -C examples/body-transform e2e
- run: make -C examples/cluster e2e
- run: make -C examples/cluster-async-router e2e
- run: make -C examples/cluster-dfp e2e
- run: make -C examples/cluster-group e2e
- run: make -C examples/cluster-least-conn e2e
- run: make -C examples/cluster-router e2e
- run: make -C examples/cluster-shard-router e2e
- run: make -C examples/filter-chain e2e
- run: make -C examples/hello e2e
- run: make -C examples/jwt-callout e2e
- run: make -C examples/lb-policy e2e
- run: make -C examples/lb-policy-header-hash e2e
- run: make -C examples/lb-policy-metadata-route e2e
- run: make -C examples/mcp-catalog-router e2e
- run: make -C examples/mcp-profile-gateway e2e
- run: make -C examples/mcp-profile-router e2e
- run: make -C examples/observability e2e
- run: make -C examples/request-ui e2e
- run: make -C examples/sse-tap e2e
- run: make -C examples/spa e2e
# ---------------------------------------------------------------------------
# integration-eg: Kubernetes integrations against Envoy Gateway in k3d.
# Uses ttl.sh images so the k3d node pulls the same images a remote cluster
# would pull, instead of relying on local Docker image import.
# ---------------------------------------------------------------------------
integration-eg:
name: ${{ matrix.integration }}
runs-on: ubuntu-latest
timeout-minutes: 35
strategy:
fail-fast: false
matrix:
include:
- integration: cluster-router-eg
image-prefix: transit-cluster-router-eg
control-image-prefix: transit-cluster-router-eg-control
- integration: cluster-async-router-eg
image-prefix: transit-cluster-async-router-eg
control-image-prefix: transit-cluster-async-router-eg-demo
- integration: tiered-router-eg
image-prefix: transit-tiered-router-eg
control-image-prefix: transit-tiered-router-eg-control
- integration: mcp-profile-tiered-router-eg
image-prefix: transit-mcp-profile-tiered-router-eg
control-image-prefix: transit-mcp-profile-tiered-router-eg-demo
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version-file: go.mod
- name: install Kubernetes tools
run: .github/scripts/install-k8s-tools.sh
- name: publish demo images
run: .github/scripts/publish-demo-images.sh
env:
INTEGRATION: ${{ matrix.integration }}
IMAGE_PREFIX: ${{ matrix.image-prefix }}
CONTROL_IMAGE_PREFIX: ${{ matrix.control-image-prefix }}
- name: run Envoy Gateway demo e2e
run: |
set -euxo pipefail
SKIP_IMAGE_BUILD=1 \
K3D_SKIP_IMAGE_IMPORT=1 \
IMAGE="${PUBLISH_IMAGE}" \
CONTROL_PLANE_IMAGE="${PUBLISH_CONTROL_PLANE_IMAGE}" \
make -C "integrations/${INTEGRATION}" e2e
env:
INTEGRATION: ${{ matrix.integration }}