#### THIS IS A TEMPLATE #### # This workflow is created to be a template for every time an e2e teest is required, on: workflow_call: inputs: k8s-version: required: true type: string variation: type: string permissions: contents: read jobs: kubernetes: name: Kubernetes ${{ inputs.variation }} runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: cache uses: actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1 with: name: docker.tar.gz - name: Create Kubernetes ${{ inputs.k8s-version }} cluster id: kind run: | kind create cluster --image=kindest/node:${{ inputs.k8s-version }} --config test/e2e/kind.yaml - name: Load images from cache run: | echo "loading docker images..." gzip -dc docker.tar.gz | docker load - name: Run e2e tests ${{ inputs.variation }} env: KIND_CLUSTER_NAME: kind SKIP_CLUSTER_CREATION: true SKIP_IMAGE_CREATION: true ENABLE_VALIDATIONS: ${{ inputs.variation == 'VALIDATIONS' }} IS_CHROOT: ${{ inputs.variation == 'CHROOT' }} run: | kind get kubeconfig > $HOME/.kube/kind-config-kind make kind-e2e-test - name: Upload e2e junit-reports ${{ inputs.variation }} uses: actions/upload-artifact@1eb3cb2b3e0f29609092a73eb033bb759a334595 # v4.1.0 if: success() || failure() with: name: e2e-test-reports-${{ inputs.k8s-version }}${{ inputs.variation }} path: 'test/junitreports/report*.xml'