-
Notifications
You must be signed in to change notification settings - Fork 8.2k
57 lines (47 loc) · 1.67 KB
/
zz-tmpl-k8s-e2e.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#### THIS IS A TEMPLATE ####
# This workflow is created to be a template for every time an e2e test 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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: cache
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
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_INGRESS_IMAGE_CREATION: true
SKIP_E2E_IMAGE_CREATION: true
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@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
if: success() || failure()
with:
name: e2e-test-reports-${{ inputs.k8s-version }}${{ inputs.variation }}
path: 'test/junitreports/report*.xml'