This repository has been archived by the owner on Nov 27, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 254
58 lines (49 loc) · 1.68 KB
/
kube-tests.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
name: Kube integration tests
on:
push:
branches:
- main
pull_request:
env:
GO_VERSION: 1.19
jobs:
check-optional-tests:
name: Check if needs to run Kube tests
runs-on: ubuntu-latest
outputs:
trigger-kube: ${{steps.runkubetest.outputs.triggered}}
steps:
- uses: khan/pull-request-comment-trigger@master
name: Check if test Kube
if: github.event_name == 'pull_request'
id: runkubetest
with:
trigger: '/test-kube'
kube-tests:
name: Kube e2e tests
runs-on: ubuntu-latest
needs: check-optional-tests
if: github.ref == 'refs/heads/main' || needs.check-optional-tests.outputs.trigger-kube == 'true'
steps:
- name: Checkout code into the Go module directory
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
cache: true
- name: Setup docker CLI
run: |
curl https://download.docker.com/linux/static/stable/x86_64/docker-20.10.3.tgz | tar xz
sudo cp ./docker/docker /usr/bin/ && rm -rf docker && docker version
- name: Setup Kube tools
run: |
sudo apt-get install jq && jq --version
curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.10.0/kind-linux-amd64 && chmod +x ./kind && sudo mv ./kind /usr/bin/ && kind version
curl -LO "https://dl.k8s.io/release/v1.20.2/bin/linux/amd64/kubectl" && sudo mv kubectl /usr/bin/ && kubectl version --client
- name: Build for Kube e2e tests
env:
BUILD_TAGS: kube
run: make -f builder.Makefile cli
- name: Kube e2e Test
run: make e2e-kube