-
Notifications
You must be signed in to change notification settings - Fork 11
57 lines (54 loc) · 1.05 KB
/
ci.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
name: build
on:
pull_request:
branches:
- master
paths-ignore:
- '**.md'
- '.gitignore'
jobs:
lint:
name: lint
runs-on: ubuntu-latest
env:
GO111MODULE: on
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 1
- name: setup-go 1.14
uses: actions/setup-go@v1
with:
go-version: 1.14
- name: Fmt
run: |
make fmt
files=$(git status -s)
[[ "$files" == "" ]] && exit 0 || exit 1
build:
name: build
needs: lint
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
os:
- linux
- darwin
arch:
- amd64
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 1
- name: setup-go 1.14
uses: actions/setup-go@v1
with:
go-version: 1.14
- name: build
run: make
env:
GOOS: ${{ matrix.os }}
GOARCH: ${{ matrix.arch }}
- name: test
run: make test