Слияние кода завершено, страница обновится автоматически
# 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 )