-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (61 loc) · 1.76 KB
/
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: E2E Tests
on:
pull_request:
branches: ["main", "master", "release-*"]
push:
branches: ["main", "master"]
jobs:
e2e:
name: Run E2E Tests
strategy:
matrix:
go-version: ["1.17"]
platform: ["ubuntu-latest"]
runs-on: ${{ matrix.platform }}
env:
KO_DOCKER_REPO: kind.local
KIND_CLUSTER_NAME: e2e
timeout-minutes: 20
steps:
- name: Set up Go ${{ matrix.go-version }}
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
id: go
- name: Setup ko
uses: imjasonh/setup-ko@v0.4 # will install latest ko version
- name: Install tparse
run: go install github.com/mfridman/tparse@latest
- name: Check out Code onto GOPATH
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Setup KinD Cluster
env:
KIND_VERSION: v0.11.1
run: |
set -x
curl -Lo ./kind https://github.com/kubernetes-sigs/kind/releases/download/${KIND_VERSION}/kind-$(uname)-amd64
chmod +x ./kind
sudo mv kind /usr/local/bin
# KinD configuration.
cat > kind.yaml <<EOF
apiVersion: kind.x-k8s.io/v1alpha4
kind: Cluster
nodes:
- role: control-plane
- role: worker
EOF
# Create a cluster!
kind create cluster --config kind.yaml --wait 3m --name ${KIND_CLUSTER_NAME}
- name: Build ko images
run: ./test/upload_test_images.sh
- name: "Run E2E Tests"
env:
TESTFLAGS: "-v -tags=e2e -count 1 -race -json"
run: |
go test ${TESTFLAGS} ./test | tparse -all -notests -format markdown >> $GITHUB_STEP_SUMMARY
- name: "Debug"
if: ${{ always() }}
run: |
kubectl get pods --all-namespaces