From 0231f9ac219df42b7777db5f332e6422b6782279 Mon Sep 17 00:00:00 2001 From: Benjamin Schimke Date: Fri, 5 Jul 2024 17:07:20 +0200 Subject: [PATCH] run in separate jobs --- .github/workflows/e2e.yaml | 43 +++++++++++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index ad46bff1..1148d2d3 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -50,9 +50,50 @@ jobs: # Prevents https://cluster-api.sigs.k8s.io/user/troubleshooting#cluster-api-with-docker----too-many-open-files sudo sysctl fs.inotify.max_user_watches=1048576 sudo sysctl fs.inotify.max_user_instances=8192 + - name: Upload artifacts + uses: actions/upload-artifact@v3 + with: + name: e2e-images + path: | + /var/lib/docker + + run-e2e-tests: + name: Run E2E Tests + runs-on: [self-hosted, linux, X64, jammy, xlarge] + needs: build-e2e-images + strategy: + matrix: + ginkgo_focus: ["Workload cluster creation", "Workload cluster scaling", "Workload cluster upgrade"] + steps: + - name: Check out repo + uses: actions/checkout@v4 + - name: Download artifacts + uses: actions/download-artifact@v3 + with: + name: e2e-images + path: /var/lib/docker + - name: Install requirements + run: | + sudo apt install make + sudo snap install go --classic + sudo apt install docker-buildx + sudo snap install kubectl --classic + - name: Load docker images + run: | + for image in $(ls /var/lib/docker); do + sudo docker load -i /var/lib/docker/$image + done + - name: Create docker network + run: | + sudo docker network create kind --driver=bridge -o com.docker.network.bridge.enable_ip_masquerade=true + - name: Increase inotify watches + run: | + # Prevents https://cluster-api.sigs.k8s.io/user/troubleshooting#cluster-api-with-docker----too-many-open-files + sudo sysctl fs.inotify.max_user_watches=1048576 + sudo sysctl fs.inotify.max_user_instances=8192 - name: Run e2e tests run: | - sudo GINKGO_FOCUS="Workload cluster scaling" SKIP_RESOURCE_CLEANUP=true make test-e2e + sudo GINKGO_FOCUS="${{ matrix.ginkgo_focus }}" SKIP_RESOURCE_CLEANUP=true make test-e2e - name: Setup tmate session if: ${{ failure() }} uses: canonical/action-tmate@main