Skip to content

Doc fixes

Doc fixes #1407

name: Kubernetes Tests
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
env:
VERSION: '1.0.0-ci1'
GITHUB_TOKEN: ${{ github.token }}
# The istio version to use for the e2e tests
# TODO(npolshak): Test across multiple versions of Istio
# https://istio.io/latest/docs/releases/supported-releases/#support-status-of-istio-releases
ISTIO_VERSION: "1.19.9"
jobs:
prepare_env:
name: Prepare Environment
runs-on: ubuntu-22.04
timeout-minutes: 5
outputs:
should-auto-succeed-kube-tests: ${{ steps.run-strategy.outputs.auto_succeed }}
steps:
- name: Cancel Previous Actions
uses: styfle/cancel-workflow-action@0.11.0
with:
access_token: ${{ github.token }}
- id: checkout-code
uses: actions/checkout@v3
with:
# We require gathering the branch and tag history since we rely on a `git diff`
# which compares the state of two branches
fetch-depth: 0
- id: process-skip-directives
uses: ./.github/workflows/composite-actions/process-skip-directives
with:
base-ref: ${{ github.base_ref }}
- id: run-strategy
name: Determine Test Run Strategy
run: |
skip_kube_tests=${{ steps.process-skip-directives.outputs.skip-kube-tests }}
if [[ ! -z $skip_kube_tests && $skip_kube_tests = true ]] ; then
echo "auto_succeed=true" >> $GITHUB_OUTPUT
fi
end_to_end_tests:
name: End-to-End (${{ matrix.test.cluster-id }})
needs: prepare_env
runs-on: ubuntu-22.04
timeout-minutes: 60
if: ${{ !github.event.pull_request.draft }}
strategy:
fail-fast: false
matrix:
# We intentionally set an upper threshold of 25 minutes for our End-to-End tests
# Our goal is to load balance tests in a way that allows quick iteration on PRs
# If tests are exceeding the 25-minute limit, please see:
# /test/kubernetes/e2e/load_balancing_tests.md
test:
# May 14th: ~ minutes execution time (see load_balancing_tests.md)
- cluster-id: 'cluster_one'
cluster-node-version: 'v1.28.0@sha256:b7a4cad12c197af3ba43202d3efe03246b3f0793f162afb40a33c923952d5b31'
kind-version: 'v0.20.0'
kubectl-version: 'v1.28.4'
helm-version: 'v3.13.2'
go-test-args: '-v -timeout=25m'
go-test-run-regex: '^TestK8sGateway$$/^RouteDelegation$$|^TestK8sGateway$$/^Glooctl$$'
# May 14th: ~ minutes execution time (see load_balancing_tests.md)
- cluster-id: 'cluster_two'
cluster-node-version: 'v1.28.0@sha256:b7a4cad12c197af3ba43202d3efe03246b3f0793f162afb40a33c923952d5b31'
kind-version: 'v0.20.0'
kubectl-version: 'v1.28.4'
helm-version: 'v3.13.2'
go-test-args: '-v -timeout=25m'
go-test-run-regex: '^TestK8sGateway$$/^Deployer$$|^TestK8sGateway$$/^RouteOptions$$|^TestK8sGateway$$/^VirtualHostOptions$$|^TestK8sGateway$$/^Upstreams$$|^TestK8sGateway$$/^HeadlessSvc$$|^TestK8sGateway$$/^PortRouting$$'
# May 14th: ~ minutes execution time (see load_balancing_tests.md)
- cluster-id: 'cluster_three'
cluster-node-version: 'v1.28.0@sha256:b7a4cad12c197af3ba43202d3efe03246b3f0793f162afb40a33c923952d5b31'
kind-version: 'v0.20.0'
kubectl-version: 'v1.28.4'
helm-version: 'v3.13.2'
go-test-args: '-v -timeout=25m'
go-test-run-regex: '(^TestK8sGatewayIstioAutoMtls$$|^TestAutomtlsIstioEdgeApisGateway$$|^TestIstioEdgeApiGateway$$)'
# May 14th: ~ minutes execution time (see load_balancing_tests.md)
- cluster-id: 'cluster_four'
cluster-node-version: 'v1.28.0@sha256:b7a4cad12c197af3ba43202d3efe03246b3f0793f162afb40a33c923952d5b31'
kind-version: 'v0.20.0'
kubectl-version: 'v1.28.4'
helm-version: 'v3.13.2'
go-test-args: '-v -timeout=25m'
go-test-run-regex: '(^TestK8sGatewayIstio$$|^TestGlooGatewayEdgeGateway$$|^TestGlooctlIstioInjectEdgeApiGateway$$|^TestK8sGatewayNoValidation$$)'
steps:
- id: auto-succeed-tests
if: needs.prepare_env.outputs.should-auto-succeed-kube-tests == 'true'
run: |
echo "Regression tests auto-succeeded"
- uses: actions/checkout@v3
- name: Prep Go Runner
uses: ./.github/workflows/composite-actions/prep-go-runner
if: needs.prepare_env.outputs.should-auto-succeed-kube-tests != 'true'
- id: setup-kind-cluster
name: Setup KinD Cluster
if: needs.prepare_env.outputs.should-auto-succeed-kube-tests != 'true'
uses: ./.github/workflows/composite-actions/setup-kind-cluster
with:
cluster-name: kind
kind-node-version: ${{ matrix.test.cluster-node-version }}
kind-version: ${{ matrix.test.kind-version }}
kubectl-version: ${{ matrix.test.kubectl-version }}
helm-version: ${{ matrix.test.helm-version }}
- id: run-tests
if: needs.prepare_env.outputs.should-auto-succeed-kube-tests != 'true'
uses: ./.github/workflows/composite-actions/kubernetes-e2e-tests
with:
cluster-name: kind
test-args: ${{ matrix.test.go-test-args }}
run-regex: ${{ matrix.test.go-test-run-regex }}
cluster-id: ${{ matrix.test.cluster-id }}
- name: Archive bug report directory on failure
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: bug-report
path: ./_test/bug_report/${{ matrix.test.cluster-id }}