1 В избранное 0 Ответвления 0

OSCHINA-MIRROR/vcs-all-in-one-git-repo-go

Присоединиться к Gitlife
Откройте для себя и примите участие в публичных проектах с открытым исходным кодом с участием более 10 миллионов разработчиков. Приватные репозитории также полностью бесплатны :)
Присоединиться бесплатно
Клонировать/Скачать
azure-pipelines.yml 2.5 КБ
Копировать Редактировать Web IDE Исходные данные Просмотреть построчно История
Jiang Xin Отправлено 10.01.2020 18:09 263ea37
# 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'

Опубликовать ( 0 )

Вы можете оставить комментарий после Вход в систему

1
https://api.gitlife.ru/oschina-mirror/vcs-all-in-one-git-repo-go.git
git@api.gitlife.ru:oschina-mirror/vcs-all-in-one-git-repo-go.git
oschina-mirror
vcs-all-in-one-git-repo-go
vcs-all-in-one-git-repo-go
master