name: E2E Tests
on:
pull_request:
paths:
- '.github/workflows/e2e.yaml'
- 'Makefile'
- 'integration-test/**'
- 'docker/Dockerfile.chef'
workflow_call: {}
workflow_dispatch: {}
permissions:
contents: read
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
jobs:
e2e:
name: Drone Integration + kind E2E
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
- name: Setup Rust build environment
uses: firestoned/github-actions/rust/setup-rust-build@d0d51c638a90bffc2a1567fe7af112b37fe8854c with:
target: x86_64-unknown-linux-gnu
- name: Cache cargo dependencies
uses: firestoned/github-actions/rust/cache-cargo@d0d51c638a90bffc2a1567fe7af112b37fe8854c
- name: Install Kind
uses: helm/kind-action@06c1ae10762d3b9c1644e7fe69596ae519e015a2 with:
install_only: true
version: v0.24.0
- name: Install kubectl
uses: azure/setup-kubectl@829323503d1be3d00ca8346e5391ca0b07a9ab0d with:
version: 'v1.31.0'
- name: Run full e2e (drone integration + kind)
run: make ci-e2e
- name: Dump Kubernetes diagnostics on failure
if: failure()
run: |
CTX=kind-bindcar-e2e
NS=bindcar-e2e
echo "::group::cluster summary ($CTX)"
kubectl --context "$CTX" get nodes -o wide 2>/dev/null || true
kubectl --context "$CTX" get pods -A -o wide 2>/dev/null || true
echo "::endgroup::"
echo "::group::events ($CTX)"
kubectl --context "$CTX" get events -A --sort-by=.lastTimestamp 2>/dev/null || true
echo "::endgroup::"
echo "::group::bindcar e2e pod ($CTX / $NS)"
kubectl --context "$CTX" -n "$NS" get pod,svc,secret,configmap -o wide 2>/dev/null || true
kubectl --context "$CTX" -n "$NS" describe pod bindcar-e2e 2>/dev/null || true
kubectl --context "$CTX" -n "$NS" logs bindcar-e2e -c bindcar --tail=300 2>/dev/null || true
kubectl --context "$CTX" -n "$NS" logs bindcar-e2e -c bind9 --tail=300 2>/dev/null || true
echo "::endgroup::"