-
Notifications
You must be signed in to change notification settings - Fork 2.8k
58 lines (44 loc) · 1.08 KB
/
push.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
49
50
51
52
53
54
55
56
57
58
name: 'push'
on:
push:
pull_request:
env:
GO111MODULE: on
jobs:
test:
strategy:
fail-fast: false
matrix:
os: [ ubuntu, windows, macOS ]
go: [
1.12.x,
1.13.x,
1.14.x
]
runs-on: ${{ matrix.os }}-latest
steps:
- name: Setup go
uses: actions/setup-go@v1
with:
go-version: ${{ matrix.go }}
- run: git config --global core.autocrlf input
if: matrix.os == 'windows'
shell: bash
- uses: actions/checkout@v2
- name: Install golangci-lint, richgo and gox
run: |
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $HOME/go/bin/ latest
go install github.com/kyoh86/richgo
go install github.com/mitchellh/gox
- name: Run tests
shell: bash
run: |
export PATH=$PATH:$HOME/go/bin/
make test
- name: Check formatting
run: make fmt
- name: Build generator
shell: bash
run: |
export PATH=$PATH:$HOME/go/bin/
make cobra_generator