Skip to content

E2E tests (nightly, full suite) #10

E2E tests (nightly, full suite)

E2E tests (nightly, full suite) #10

Workflow file for this run

name: E2E tests (nightly, full suite)
# Runs ONLY specs labeled `Nightly` (slow / destructive scaling cases, etc.).
# Triggers:
# - schedule: every day at 00:00 Sydney time
# - workflow_dispatch: manual run
# Pull requests do NOT trigger this workflow; PRs use e2e.yaml which skips
# Nightly specs.
on:
schedule:
# 00:00 Sydney time. GitHub cron is UTC; Sydney is UTC+10 (AEST) for
# most of the year, so 14:00 UTC == 00:00 AEST next day. During AEDT
# (UTC+11, ~Oct–early Apr) this fires at 01:00 local; acceptable drift.
- cron: '0 14 * * *'
workflow_dispatch:
inputs:
branch:
description: 'Branch name to run E2E tests against'
required: true
default: 'main'
provider:
description: 'E2E provider — "upstream" or "azure" (Azure-managed KEDA add-on).'
required: false
default: 'upstream'
type: choice
options:
- upstream
- azure
istio_version:
description: 'Istio version (e.g. 1.29.0). Leave empty to use default from versions.env'
required: false
default: ''
gateway_api_version:
description: 'Gateway API CRD version (e.g. v1.2.0). Leave empty to use default from versions.env'
required: false
default: ''
bbr_version:
description: 'BBR release version (e.g. v1.3.1). Leave empty to use default from versions.env'
required: false
default: ''
keda_version:
description: 'KEDA Helm chart version (e.g. v2.19.0). Leave empty to use default from versions.env'
required: false
default: ''
keda_kaito_scaler_version:
description: 'KEDA Kaito Scaler Helm chart version (e.g. v0.3.3). Leave empty to use default from versions.env'
required: false
default: ''
env:
# Names are kept short so that the AKS-managed node resource group
# ("MC_<RG>_<CLUSTER>_<LOCATION>") stays within the 80-char limit.
RESOURCE_GROUP: "kaito-nightly-rg-${{ github.run_id }}"
CLUSTER_NAME: "kaito-nightly-aks-${{ github.run_id }}"
ACR_NAME: "kaitonightly${{ github.run_id }}acr"
GPU_MOCKER_IMAGE: "gpu-node-mocker:latest-${{ github.run_id }}"
LOCATION: australiaeast
NODE_COUNT: '3'
NODE_VM_SIZE: Standard_D8s_v5
permissions:
contents: read
jobs:
e2e-nightly-tests:
runs-on: [ "self-hosted", "hostname:kaito-e2e-github-runner" ]
environment: e2e-test
permissions:
contents: read
steps:
- name: Checkout Repository
uses: actions/checkout@v6
with:
ref: ${{ github.event.inputs.branch || github.ref }}
- name: Load component versions
run: |
# Source defaults from the centralized version file (loaded exactly once).
source versions.env
# workflow_dispatch inputs override defaults when non-empty.
INPUT_PROVIDER="${{ github.event.inputs.provider }}"
INPUT_ISTIO="${{ github.event.inputs.istio_version }}"
INPUT_GWAPI="${{ github.event.inputs.gateway_api_version }}"
INPUT_BBR="${{ github.event.inputs.bbr_version }}"
INPUT_KEDA="${{ github.event.inputs.keda_version }}"
INPUT_KKS="${{ github.event.inputs.keda_kaito_scaler_version }}"
[ -n "${INPUT_PROVIDER}" ] && E2E_PROVIDER="${INPUT_PROVIDER}"
[ -n "${INPUT_ISTIO}" ] && ISTIO_VERSION="${INPUT_ISTIO}"
[ -n "${INPUT_GWAPI}" ] && GATEWAY_API_VERSION="${INPUT_GWAPI}"
[ -n "${INPUT_BBR}" ] && BBR_VERSION="${INPUT_BBR}"
[ -n "${INPUT_KEDA}" ] && KEDA_VERSION="${INPUT_KEDA}"
[ -n "${INPUT_KKS}" ] && KEDA_KAITO_SCALER_VERSION="${INPUT_KKS}"
# Validate provider value.
case "${E2E_PROVIDER}" in
upstream|azure) ;;
*)
echo "Invalid E2E_PROVIDER='${E2E_PROVIDER}'. Must be 'upstream' or 'azure'." >&2
exit 1
;;
esac
case "${E2E_PROVIDER}" in
upstream) KEDA_NAMESPACE="keda" ;;
azure) KEDA_NAMESPACE="kube-system" ;;
esac
# Export to GITHUB_ENV so all subsequent steps inherit these.
{
echo "GO_VERSION=${GO_VERSION}"
echo "E2E_PROVIDER=${E2E_PROVIDER}"
echo "KEDA_NAMESPACE=${KEDA_NAMESPACE}"
echo "ISTIO_VERSION=${ISTIO_VERSION}"
echo "GATEWAY_API_VERSION=${GATEWAY_API_VERSION}"
echo "BBR_VERSION=${BBR_VERSION}"
echo "KEDA_VERSION=${KEDA_VERSION}"
echo "KEDA_KAITO_SCALER_VERSION=${KEDA_KAITO_SCALER_VERSION}"
echo "AKS_K8S_VERSION=${AKS_K8S_VERSION}"
} >> "$GITHUB_ENV"
- name: Print versions
run: |
echo "E2E_PROVIDER=${E2E_PROVIDER}"
echo "KEDA_NAMESPACE=${KEDA_NAMESPACE}"
echo "GO_VERSION=${GO_VERSION}"
echo "ISTIO_VERSION=${ISTIO_VERSION}"
echo "GATEWAY_API_VERSION=${GATEWAY_API_VERSION}"
echo "BBR_VERSION=${BBR_VERSION}"
echo "KEDA_VERSION=${KEDA_VERSION}"
echo "KEDA_KAITO_SCALER_VERSION=${KEDA_KAITO_SCALER_VERSION}"
echo "AKS_K8S_VERSION=${AKS_K8S_VERSION}"
- name: Setup Go
uses: actions/setup-go@v6
with:
go-version: ${{ env.GO_VERSION }}
- name: Azure Login
run: az login --identity
- name: Build gpu-node-mocker image
run: make docker-build
env:
IMG: ${{ env.GPU_MOCKER_IMAGE }}
- name: Setup cluster
run: make e2e-setup
env:
RESOURCE_GROUP: ${{ env.RESOURCE_GROUP }}
CLUSTER_NAME: ${{ env.CLUSTER_NAME }}
ACR_NAME: ${{ env.ACR_NAME }}
LOCATION: ${{ env.LOCATION }}
NODE_COUNT: ${{ env.NODE_COUNT }}
NODE_VM_SIZE: ${{ env.NODE_VM_SIZE }}
- name: Push gpu-node-mocker image
id: image
run: |
OUTPUT=$(make e2e-push-image)
echo "image=$(echo "$OUTPUT" | grep '^image=' | cut -d= -f2-)" >> "$GITHUB_OUTPUT"
env:
ACR_NAME: ${{ env.ACR_NAME }}
IMG: ${{ env.GPU_MOCKER_IMAGE }}
- name: Install components
run: make e2e-install
env:
SHADOW_CONTROLLER_IMAGE: "${{ steps.image.outputs.image }}"
- name: Validate components
run: make e2e-validate
- name: Run E2E tests (Nightly specs only)
# Restrict ginkgo to specs tagged with the Nightly label.
# NetworkPolicy specs are temporarily disabled.
run: make test-e2e
env:
E2E_LABEL: "Nightly && !NetworkPolicy"
- name: Dump cluster state
if: failure()
run: make e2e-dump
- name: Teardown cluster
if: always()
run: make e2e-teardown
env:
RESOURCE_GROUP: ${{ env.RESOURCE_GROUP }}