-
Notifications
You must be signed in to change notification settings - Fork 3
44 lines (40 loc) · 1.23 KB
/
unit-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
42
43
44
name: unit-test
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
unit-test:
if: github.repository_owner == 'keikoproj'
name: unit-test
runs-on: ubuntu-18.04
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ^1.13
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Get kubebuilder
env:
version: 2.3.1 # latest stable version
arch: amd64
run: |
# download the release
curl -L -O "https://github.com/kubernetes-sigs/kubebuilder/releases/download/v2.3.1/kubebuilder_2.3.1_linux_amd64.tar.gz"
# extract the archive
tar -zxvf kubebuilder_${version}_linux_${arch}.tar.gz
mv kubebuilder_${version}_linux_${arch} kubebuilder && sudo mv kubebuilder /usr/local/
# update your PATH to include /usr/local/kubebuilder/bin
export PATH=$PATH:/usr/local/kubebuilder/bin
- name: Build
run: |
make manager
- name: Test
run: |
make test
- name: Upload to Codecov
uses: codecov/codecov-action@v1
with:
file: ./coverage.txt