-
Notifications
You must be signed in to change notification settings - Fork 40
70 lines (59 loc) · 1.86 KB
/
e2e.yml
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: E2E-Test
on:
workflow_call:
inputs:
kind_tag:
description: "Tag of Kind image"
type: "string"
env:
GO_VERSION: "~1.23"
defaults:
run:
shell: bash
jobs:
e2e-test:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download image
uses: actions/download-artifact@v4
with:
name: open-feature-operator-local-${{ github.sha }}
path: ${{ github.workspace }}
- name: Cache build tools
id: cache-build-tools
uses: actions/cache@v4
with:
path: ./bin
key: build-tools-${{ github.ref_name }}
- name: Load open-feature-operator image into docker
run: |
docker load --input ${{ github.workspace }}/open-feature-operator-local.tar
- name: Create k8s Kind Cluster
uses: helm/[email protected]
with:
config: ./test/e2e/kind-cluster.yml
cluster_name: open-feature-operator-test
node_image: kindest/node:${{ inputs.kind_tag }}
- name: Load open-feature-operator image into Kind cluster
run: |
kind load docker-image open-feature-operator-local:${{ github.sha }} --name open-feature-operator-test
- name: Install Chainsaw
uses: kyverno/action-install-chainsaw@f2b47b97dc889c12702113753d713f01ec268de5 # v0.2.12
- name: Install OFO
run: |
IMG=open-feature-operator-local:${{ github.sha }} make deploy-operator
- name: Run e2e test
run: |
make e2e-test-chainsaw
- name: Create reports
if: failure()
working-directory: ./.github/scripts
run: ./create-reports.sh
- name: Upload cluster logs
if: failure()
uses: actions/upload-artifact@v4
with:
name: e2e-tests
path: .github/scripts/logs