forked from mittwald/go-helm-client
-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (40 loc) · 1 KB
/
build.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
45
46
47
48
name: Compile & Test
on: [push, pull_request]
jobs:
codegen-verify:
name: Verify code generation
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.17
uses: actions/setup-go@v2
with:
go-version: 1.17
- uses: actions/checkout@v2
- name: Install and run mockgen
run: |
set -x
apt-get -y update && apt-get -y install git
cd /
go get -u github.com/golang/mock/[email protected]
cd -
go env
go generate ./...
git diff | cat
git status --porcelain=v1
test $(git status --porcelain=v1 | wc -l) -eq 0
env:
GO111MODULE: on
build:
name: Run tests
runs-on: ubuntu-latest
strategy:
matrix:
go: [ '1.17', '1.16' ]
steps:
- uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}
- name: Run unit tests
run: go test ./...