-
Notifications
You must be signed in to change notification settings - Fork 24
43 lines (37 loc) · 1.11 KB
/
UT.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
name: UT&Lint
on: [push]
jobs:
job1:
name: UT
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
steps:
- name: Set up Go 1.13
uses: actions/setup-go@v1
with:
go-version: 1.13
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Build
run: go build -mod=vendor ./cmd/gptn
- name: Test
run: go test -mod=vendor ./...
job2:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.13
uses: actions/setup-go@v1
with:
go-version: 1.13
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Export GOPATH
run: echo "::set-env name=GOPATH::$(go env GOPATH)"
- name: Append GOPATH onto PATH
run: echo "::set-env name=PATH::$PATH:$GOPATH/bin"
- run: curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $GOPATH/bin v1.21.0
- run: golangci-lint --version
- run: golangci-lint run ./...