forked from saulmaldonado/agones-minecraft
-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (31 loc) · 805 Bytes
/
CI.yml
File metadata and controls
41 lines (31 loc) · 805 Bytes
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
name: CI
on:
pull_request:
branches:
- main
paths:
- 'controller/**'
jobs:
test-and-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.16.3
- name: Set up testing env.
run: |
os=$(go env GOOS)
arch=$(go env GOARCH)
curl -L https://go.kubebuilder.io/dl/2.3.1/${os}/${arch} | tar -xz -C /tmp/
sudo mv /tmp/kubebuilder_2.3.1_${os}_${arch} /usr/local/kubebuilder
- name: Test
working-directory: ./controller
run: go test -v ./...
- name: Build
working-directory: ./controller
run: go build main.go
- name: Build Docker
working-directory: ./controller
run: docker build .