-
Notifications
You must be signed in to change notification settings - Fork 25
69 lines (69 loc) · 1.86 KB
/
validation.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
name: validation
on: [push, pull_request]
# Permission forced by repo-level setting; only elevate on job-level
permissions:
contents: read
# packages: read
env:
GO111MODULE: "on"
PROJECTNAME: "watermarkpodautoscaler"
GO_VERSION: 1.22
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v1
with:
go-version: ${{ env.GO_VERSION }}
id: go
- name: Install required packages
uses: mstksg/get-package@v1
with:
apt-get: mercurial jq build-essential
- name: Check out code into the Go module directory
uses: actions/checkout@v1
- name: Install tools
run: |
make install-tools
- name: Run build
run: |
make manager
- name: Run unit/control plane tests (fake cluster)
run: |
make test
e2e:
runs-on: ubuntu-latest
strategy:
matrix:
k8s:
- v1.14.10
- v1.16.9
- v1.18.4
- v1.21.1
steps:
- name: Set up Go
uses: actions/setup-go@v1
with:
go-version: ${{ env.GO_VERSION }}
id: go
- name: Install required packages
uses: mstksg/get-package@v1
with:
apt-get: mercurial jq build-essential
- name: Check out code into the Go module directory
uses: actions/checkout@v1
- name: Install tools
run: |
make install-tools
- name: Setup kind for e2e - kube ${{ matrix.k8s }}
uses: helm/kind-action@v1.2.0
with:
config: test/cluster-kind.yaml
cluster_name: wpa-e2e-test
- name: Run e2e tests - kube ${{ matrix.k8s }}
run: |
export PATH=$PATH:$(pwd)/bin
kubectl cluster-info --context kind-wpa-e2e-test
kubectl get pods -n kube-system
make e2e