forked from CloudNativeSDWAN/cnwan-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (34 loc) · 963 Bytes
/
test.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
name: Test
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
types: [opened, edited, reopened, synchronize]
jobs:
test:
name: Run tests
runs-on: ubuntu-latest
steps:
- name: Setup go
uses: actions/setup-go@v2
- name: Cache go mod
uses: actions/cache@v2
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Install Kubebuilder
id: install-kubebuilder
run: |
curl -L -o kubebuilder https://go.kubebuilder.io/dl/latest/$(go env GOOS)/$(go env GOARCH)
chmod +x kubebuilder && mv kubebuilder /usr/local/bin/
- name: Checkout to repository
id: checkout-code
uses: actions/checkout@master
- name: Run tests
id: test-code
run: make test