@@ -2,18 +2,18 @@ name: Build and Test
22on :
33 pull_request :
44 branches :
5- - ' main'
5+ - " main"
66 # Release branches are like "release/v0.1", "release/v0.2", etc. where we backport the changes to non EOL versions.
77 # The branch will be created from the main branch after the initial release tag is cut. For example, when we cut v0.8.0 release,
88 # we will create a branch "release/v0.8" from the main branch. For rc release, we simply iterate on main branch.
99 #
1010 # See RELEASES.md for more details.
11- - ' release/**'
11+ - " release/**"
1212
1313 push :
1414 branches :
15- - ' main'
16- - ' release/**'
15+ - " main"
16+ - " release/**"
1717
1818concurrency :
1919 # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-using-concurrency-to-cancel-any-in-progress-job-or-run
3838 - '!**/*.md'
3939 - '!site/**'
4040 - '!netlify.toml'
41- predicate-quantifier : every # Make the filters be AND-ed
42- token : " " # don't use github api
41+ predicate-quantifier : every # Make the filters be AND-ed
42+ token : " " # don't use github api
4343 outputs :
4444 code : ${{ steps.changes.outputs.code }}
4545
@@ -74,18 +74,30 @@ jobs:
7474 - name : Start Ollama server
7575 if : matrix.os == 'ubuntu-latest'
7676 run : |
77- curl -fsSL https://ollama.com/install.sh | sh
77+ curl -fsSL https://ollama.com/install.sh | sh && sudo systemctl stop ollama
78+ nohup ollama serve > ollama.log 2>&1 &
7879 timeout 30 sh -c 'until nc -z localhost 11434; do sleep 1; done'
79- ollama pull qwen3:0.6b
80-
80+ grep _MODEL .env.ollama | cut -d= -f2 | xargs -I{} ollama pull {}
81+ env :
82+ OLLAMA_CONTEXT_LENGTH : 131072 # Larger context for goose
83+ OLLAMA_HOST : 0.0.0.0
84+ # Download Envoy via func-e using implicit default version `aigw` would
85+ # otherwise need to download during test runs.
86+ - name : Download Envoy via func-e
87+ run : go tool -modfile=tools/go.mod func-e run --version
88+ env :
89+ FUNC_E_HOME : /tmp/envoy-gateway # hard-coded directory in EG
8190 - env :
8291 TEST_AWS_ACCESS_KEY_ID : ${{ secrets.AWS_BEDROCK_USER_AWS_ACCESS_KEY_ID }}
8392 TEST_AWS_SECRET_ACCESS_KEY : ${{ secrets.AWS_BEDROCK_USER_AWS_SECRET_ACCESS_KEY }}
8493 TEST_OPENAI_API_KEY : ${{ secrets.ENVOY_AI_GATEWAY_OPENAI_API_KEY }}
94+ TEST_GITHUB_ACCESS_TOKEN : ${{ secrets.GITHUB_TOKEN }}
8595 run : make test-coverage
96+ - if : failure()
97+ run : cat ollama.log || true
8698 - name : Upload coverage to Codecov
8799 if : matrix.os == 'ubuntu-latest'
88- uses : codecov/codecov-action@18283e04ce6e62d37312384ff67231eb8fd56d24 # v5.4.3
100+ uses : codecov/codecov-action@18283e04ce6e62d37312384ff67231eb8fd56d24 # v5.4.3
89101 with :
90102 fail_ci_if_error : true
91103 files : ./out/go-test-coverage.out
@@ -157,9 +169,9 @@ jobs:
157169 # Once it's supported, the following "binary installation" steps below can be just removed and
158170 # we can simply exec.Cmd with "go tool -modfile=tools/go.mod func-e run" with the envoy version configured via ENVOY_VERSION env var.
159171 include :
160- - version : 1.35.0 # NOTE: when updating this, also update the comment in the CONTRIBUTING.md file.
172+ - version : 1.35.0 # NOTE: when updating this, also update the comment in the CONTRIBUTING.md file.
161173 os : ubuntu-latest
162- - version : 1.35.0 # NOTE: when updating this, also update the comment in the CONTRIBUTING.md file.
174+ - version : 1.35.0 # NOTE: when updating this, also update the comment in the CONTRIBUTING.md file.
163175 os : macos-latest
164176 - version : latest
165177 os : ubuntu-latest
@@ -199,6 +211,7 @@ jobs:
199211 TEST_GROK_API_KEY : ${{ secrets.ENVOY_AI_GATEWAY_GROK_API_KEY }}
200212 TEST_SAMBANOVA_API_KEY : ${{ secrets.ENVOY_AI_GATEWAY_SAMBANOVA_API_KEY }}
201213 TEST_DEEPINFRA_API_KEY : ${{ secrets.ENVOY_AI_GATEWAY_DEEPINFRA_API_KEY }}
214+ TEST_GITHUB_ACCESS_TOKEN : ${{ secrets.GITHUB_TOKEN }}
202215 run : make test-extproc
203216
204217 test_e2e :
@@ -242,23 +255,51 @@ jobs:
242255 TEST_GEMINI_API_KEY : ${{ secrets.ENVOY_AI_GATEWAY_GEMINI_API_KEY }}
243256 run : make test-e2e
244257
258+ test_e2e_upgrade :
259+ needs : changes
260+ if : ${{ needs.changes.outputs.code == 'true' }}
261+ name : E2E Test for Upgrades (k8s ${{ matrix.k8s-version }})
262+ runs-on : ubuntu-latest
263+ strategy :
264+ fail-fast : false
265+ matrix :
266+ # Note: this is to simply ensure that the controller working as expected with or without
267+ # extproc being inserted as a k8s sidecar (init container with the restartPolicy=always).
268+ # On newer k8s versions (v1.33+), that is always enabled by default, so we only need to test
269+ # on older versions. After v1.32 reaches EOL, we can remove the older k8s versions from here.
270+ k8s-version :
271+ - v1.33.4
272+ - v1.32.8
273+ steps :
274+ - uses : actions/checkout@v4
275+ - uses : actions/setup-go@v5
276+ with :
277+ cache : false
278+ go-version-file : go.mod
279+ - uses : actions/cache@v4
280+ with :
281+ path : |
282+ ~/.cache/go-build
283+ ~/.cache/golangci-lint
284+ ~/go/pkg/mod
285+ ~/go/bin
286+ key : e2e-test-${{ hashFiles('**/go.mod', '**/go.sum', '**/Makefile') }}
287+ - uses : docker/setup-buildx-action@v3
288+ - run : make test-e2e-upgrade
289+ env :
290+ # We only need to test the upgrade from the latest stable version of EG.
291+ EG_VERSION : v1.5.0
292+ K8S_VERSION : ${{ matrix.k8s-version }}
293+
245294 test_e2e_inference_extension :
246295 needs : changes
247296 if : ${{ needs.changes.outputs.code == 'true' }}
248- name : E2E Test for Inference Extensions (Envoy Gateway ${{ matrix.name }})
297+ name : E2E Test for Inference Extensions
249298 # TODO: make it possible to run this job on macOS as well, which is a bit tricky due to the nested
250299 # virtualization is not supported on macOS runners.
251300 # E.g. Use https://github.com/douglascamata/setup-docker-macos-action per the comment in
252301 # https://github.com/actions/runner-images/issues/17#issuecomment-1971073406
253302 runs-on : ubuntu-latest
254- strategy :
255- fail-fast : false
256- matrix :
257- include :
258- - name : latest
259- envoy_gateway_version : v0.0.0-latest
260- - name : v1.5.0
261- envoy_gateway_version : v1.5.0
262303 steps :
263304 - uses : actions/checkout@v4
264305 - uses : actions/setup-go@v5
@@ -275,12 +316,90 @@ jobs:
275316 key : e2e-test-${{ hashFiles('**/go.mod', '**/go.sum', '**/Makefile') }}
276317 - uses : docker/setup-buildx-action@v3
277318 - run : make test-e2e-inference-extension
319+ env :
320+ # We only need to test with the latest stable version of EG, since these e2e tests
321+ # do not depend on the EG version.
322+ EG_VERSION : v1.5.0
323+
324+ test_e2e_namespaced :
325+ needs : changes
326+ if : ${{ needs.changes.outputs.code == 'true' }}
327+ name : E2E Test for Namespaced Controller
328+ # TODO: make it possible to run this job on macOS as well, which is a bit tricky due to the nested
329+ # virtualization is not supported on macOS runners.
330+ # E.g. Use https://github.com/douglascamata/setup-docker-macos-action per the comment in
331+ # https://github.com/actions/runner-images/issues/17#issuecomment-1971073406
332+ runs-on : ubuntu-latest
333+ steps :
334+ - uses : actions/checkout@v4
335+ - uses : actions/setup-go@v5
336+ with :
337+ cache : false
338+ go-version-file : go.mod
339+ - uses : actions/cache@v4
340+ with :
341+ path : |
342+ ~/.cache/go-build
343+ ~/.cache/golangci-lint
344+ ~/go/pkg/mod
345+ ~/go/bin
346+ key : e2e-test-${{ hashFiles('**/go.mod', '**/go.sum', '**/Makefile') }}
347+ - uses : docker/setup-buildx-action@v3
348+ - run : make test-e2e-namespaced
349+ env :
350+ # We only need to test with the latest stable version of EG, since these e2e tests
351+ # do not depend on the EG version.
352+ EG_VERSION : v1.5.0
353+
354+ test_e2e_aigw :
355+ needs : changes
356+ name : E2E Test for aigw CLI
357+ if : ${{ needs.changes.outputs.code == 'true' }}
358+ runs-on : ubuntu-latest
359+ steps :
360+ - uses : actions/checkout@v4
361+ - uses : actions/setup-go@v5
362+ with :
363+ cache : false
364+ go-version-file : go.mod
365+ - uses : actions/cache@v4
366+ with :
367+ path : |
368+ ~/.cache/go-build
369+ ~/.cache/golangci-lint
370+ ~/go/pkg/mod
371+ ~/go/bin
372+ key : e2e-aigw-test-${{ hashFiles('**/go.mod', '**/go.sum', '**/Makefile') }}
373+ - uses : docker/setup-buildx-action@v3
374+ - name : Start Ollama server
375+ run : |
376+ curl -fsSL https://ollama.com/install.sh | sh && sudo systemctl stop ollama
377+ nohup ollama serve > ollama.log 2>&1 &
378+ timeout 30 sh -c 'until nc -z localhost 11434; do sleep 1; done'
379+ grep _MODEL .env.ollama | cut -d= -f2 | xargs -I{} ollama pull {}
380+ env :
381+ OLLAMA_CONTEXT_LENGTH : 131072 # Larger context for goose
382+ OLLAMA_HOST : 0.0.0.0
383+ # Download Envoy via func-e using implicit default version `aigw` would
384+ # otherwise need to download during test runs.
385+ - name : Download Envoy via func-e
386+ run : go tool -modfile=tools/go.mod func-e run --version
387+ env :
388+ FUNC_E_HOME : /tmp/envoy-gateway # hard-coded directory in EG
389+ - name : Install Goose
390+ env :
391+ GOOSE_VERSION : v1.8.0
392+ run : |
393+ curl -fsSL https://github.com/block/goose/releases/download/stable/download_cli.sh | CONFIGURE=false bash
394+ - run : make test-e2e-aigw
395+ - if : failure()
396+ run : cat ollama.log || true
278397
279398 docker_push :
280399 # Docker builds are verified in test_e2e job, so we only need to push the images when the event is a push event.
281400 if : github.event_name == 'push'
282401 name : Push Docker Images
283- needs : [unittest, test_crdcel, test_controller, test_extproc, test_e2e, test_e2e_inference_extension ]
402+ needs : [ci-required ]
284403 uses : ./.github/workflows/docker_build_job.yaml
285404 secrets : inherit
286405
@@ -312,7 +431,9 @@ jobs:
312431 - test_controller
313432 - test_extproc
314433 - test_e2e
434+ - test_e2e_upgrade
315435 - test_e2e_inference_extension
436+ - test_e2e_aigw
316437 # We need this to run always to force-fail (and not skip) if any needed
317438 # job has failed. Otherwise, a skipped job will not fail the workflow.
318439 if : always()
0 commit comments