-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathazure-pipelines.yml
47 lines (44 loc) · 1.12 KB
/
azure-pipelines.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
trigger:
- master
pool:
vmImage: "ubuntu-latest"
strategy:
matrix:
# go 1.16:
# go_version: "1.16beta1"
go 1.15:
go_version: "1.15.6"
go 1.14:
go_version: "1.14.13"
steps:
- task: GoTool@0
inputs:
version: "$(go_version)"
displayName: Install Go
- task: Go@0
inputs:
command: "get"
arguments: "-d"
workingDirectory: "$(System.DefaultWorkingDirectory)"
displayName: "Get dependencies"
- task: Go@0
inputs:
command: "get"
arguments: "golang.org/x/lint/golint honnef.co/go/tools/cmd/staticcheck"
workingDirectory: /tmp
displayName: "Install golint and staticcheck"
- script: ~/go/bin/golint -set_exit_status ./...
displayName: "Run golint"
- script: ~/go/bin/staticcheck ./...
displayName: "Run staticcheck"
- task: Go@0
inputs:
command: "test"
arguments: "-race -coverprofile=coverage.txt -covermode=atomic"
displayName: "Run tests"
- script: bash <(curl -s https://codecov.io/bash)
displayName: "Upload coverage"
- task: Go@0
inputs:
command: "build"
displayName: "Run build"