-
Notifications
You must be signed in to change notification settings - Fork 18
76 lines (73 loc) · 2.45 KB
/
build-test.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
74
75
76
# Copyright 2022 Google LLC All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: Space Agon Build/Unit Test/Integration Test
on:
push:
branches:
- main
pull_request:
types: [synchronize, opened]
jobs:
unit-test:
runs-on: ubuntu-latest
steps:
- name: Pull repo
uses: actions/checkout@v3
- name: Lint
uses: golangci/golangci-lint-action@v3
with:
version: latest
args: --timeout=15m
skip-build-cache: true
- name: Unit test
run: make test
integration-test:
strategy:
matrix:
k8s_version:
- "v1.26.11"
- "v1.27.8"
- "v1.28.4"
runs-on: ubuntu-latest
steps:
- name: Pull repo
uses: actions/checkout@v3
- name: Start minikube
uses: medyagh/setup-minikube@master
id: space-agon
with:
kubernetes-version: ${{ matrix.k8s_version }}
cpus: 2
memory: 4096m
- name: Install helm
run: |
curl https://baltocdn.com/helm/signing.asc | gpg --dearmor | sudo tee /usr/share/keyrings/helm.gpg > /dev/null &&
sudo apt-get install apt-transport-https --yes &&
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/helm.gpg] https://baltocdn.com/helm/stable/debian/ all main" | sudo tee /etc/apt/sources.list.d/helm-stable-debian.list &&
sudo apt-get update &&
sudo apt-get install helm -y
- name: Add Helm Repositories
run: make helm-repo-add
- name: Install Agones in minikube
run: make agones-install-local
- name: Install Open Match in minikube
run: make openmatch-install-local
- name: Build space-agon for github-actions
run: make build-local
- name: Install space-agon in minikube
run: make install-local
- name: Run integration-test
run: |
nohup minikube tunnel &
make integration-test