forked from gomods/athens
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
27 lines (23 loc) · 893 Bytes
/
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
# Go
# Build your Go project.
# Add steps that test, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/go
pool:
vmImage: 'vs2017-win2016'
variables:
GOBIN: 'C:\Go\bin' # Go binaries path
GOPATH: '$(system.defaultWorkingDirectory)\gopath' # Go workspace path
GO111MODULE: 'on'
modulePath: '$(GOPATH)\src\github.com\$(build.repository.name)' # Path to the module's code
steps:
- powershell: |
choco upgrade golang
mkdir "$env:GOPATH\pkg" | out-null
mkdir "$env:modulePath" | out-null
robocopy "$env:system_defaultWorkingDirectory\" "$env:modulePath\" /E /Z /ZB /R:5 /W:5 /TBD /NP /V /XD "$env:GOPATH"
exit ($LastExitCode -band 24)
displayName: 'set up the Go workspace'
- powershell: |
& "C:\\Go\\bin\\go.exe" test -mod=vendor -race ./...
workingDirectory: '$(modulePath)'
displayName: 'run tests'