代码拉取完成,页面将自动刷新
# 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'
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。