1 Star 1 Fork 0

Git工具集/git-repo-go

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
azure-pipelines.yml 2.49 KB
一键复制 编辑 原始数据 按行查看 历史
Jiang Xin 提交于 2020-01-10 23:09 . pipeline: add pipeline for branch 'pu'
# Go
# Build your Go project.
# Add steps that test, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/go
trigger:
- master
- pu
jobs:
- job: linux
displayName: Linux
condition: succeeded()
pool:
vmImage: 'ubuntu-latest'
variables:
GOBIN: '$(GOPATH)/bin' # Go binaries path
GOPATH: '$(system.defaultWorkingDirectory)/gopath' # Go workspace path
modulePath: '$(GOPATH)/src/github.com/$(build.repository.name)' # Path to the module's code
steps:
- script: |
mkdir -p '$(GOBIN)'
mkdir -p '$(GOPATH)/pkg'
mkdir -p '$(modulePath)'
shopt -s extglob
shopt -s dotglob
mv !(gopath) '$(modulePath)'
echo '##vso[task.prependpath]$(GOBIN)'
echo '##vso[task.prependpath]$(GOROOT)/bin'
displayName: 'Set up the Go workspace'
- script: |
export GO111MODULE=on
go version
make
workingDirectory: '$(modulePath)'
displayName: 'Get dependencies, then build'
- script: |
make ut
workingDirectory: '$(modulePath)'
displayName: 'Unit test'
- script: |
make it
workingDirectory: '$(modulePath)'
displayName: 'Integration test'
- script: |
export GO111MODULE=on
go get -u golang.org/x/lint/golint
make golint
workingDirectory: '$(modulePath)'
displayName: 'Code style test'
- job: osx
displayName: MacOSX
condition: succeeded()
pool: Hosted macOS
variables:
GOBIN: '$(GOPATH)/bin' # Go binaries path
GOPATH: '$(system.defaultWorkingDirectory)/gopath' # Go workspace path
modulePath: '$(GOPATH)/src/github.com/$(build.repository.name)' # Path to the module's code
steps:
- script: |
mkdir -p '$(GOBIN)'
mkdir -p '$(GOPATH)/pkg'
mkdir -p '$(modulePath)'
shopt -s extglob
shopt -s dotglob
mv !(gopath) '$(modulePath)'
echo '##vso[task.prependpath]$(GOBIN)'
echo '##vso[task.prependpath]$(GOROOT)/bin'
displayName: 'Set up the Go workspace'
- script: |
export GO111MODULE=on
go version
make
workingDirectory: '$(modulePath)'
displayName: 'Get dependencies, then build'
- script: |
make ut
workingDirectory: '$(modulePath)'
displayName: 'Unit test'
- script: |
make it
workingDirectory: '$(modulePath)'
displayName: 'Integration test'
- script: |
export GO111MODULE=on
go get -u golang.org/x/lint/golint
make golint
workingDirectory: '$(modulePath)'
displayName: 'Code style test'
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/vcs-all-in-one/git-repo-go.git
[email protected]:vcs-all-in-one/git-repo-go.git
vcs-all-in-one
git-repo-go
git-repo-go
master

搜索帮助