Skip to content

feat: add e2e smoke test #1

feat: add e2e smoke test

feat: add e2e smoke test #1

Workflow file for this run

name: E2E
on:
push:
branches: [main]
paths-ignore: ['docs/**', '*.md', 'LICENSE']
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
smoke:
name: Smoke
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Create kind cluster
run: |
kind create cluster --name e2e --wait 5m
kubectl wait --for=condition=ready node --all --timeout=2m
- name: Install Gateway API CRDs
run: |
kubectl apply -f https://github.com/kubernetes-sigs/gateway-api/releases/download/v1.2.1/standard-install.yaml
kubectl wait --for=condition=established crd/gatewayclasses.gateway.networking.k8s.io --timeout=60s
- name: Deploy nantian-gw
run: |
kubectl apply -k deploy/kubernetes/overlays/kind-conformance
kubectl wait --for=condition=ready pod --all -n nantian-gw --timeout=180s
- name: Run smoke test
run: CLUSTER_NAME=e2e ./test/e2e/smoke/run.sh --no-cleanup
- name: Collect logs on failure
if: failure()
run: |
kubectl describe pods -n nantian-gw
kubectl logs -n nantian-gw --all-containers --tail=200
- name: Cleanup
if: always()
run: kind delete cluster --name e2e