Skip to content
This repository has been archived by the owner on Jun 25, 2022. It is now read-only.

Commit

Permalink
Add Azure Pipelines
Browse files Browse the repository at this point in the history
  • Loading branch information
markbates committed Feb 24, 2019
1 parent d93b0e1 commit 905bd74
Show file tree
Hide file tree
Showing 3 changed files with 78 additions and 37 deletions.
37 changes: 0 additions & 37 deletions .travis.yml

This file was deleted.

59 changes: 59 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
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

jobs:
- job: Windows
pool:
vmImage: "vs2017-win2016"
strategy:
matrix:
go 1.9:
go_version: "1.9"
go 1.10:
go_version: "1.10"
go 1.11 (on):
go_version: "1.11"
GO111MODULE: "on"
go 1.11 (off):
go_version: "1.11"
GO111MODULE: "off"
steps:
- template: azure-tests.yml

- job: macOS
pool:
vmImage: "macOS-10.13"
strategy:
matrix:
go 1.9:
go_version: "1.9"
go 1.10:
go_version: "1.10"
go 1.11 (on):
go_version: "1.11"
GO111MODULE: "on"
go 1.11 (off):
go_version: "1.11"
GO111MODULE: "off"
steps:
- template: azure-tests.yml

- job: Linux
pool:
vmImage: "ubuntu-16.04"
strategy:
matrix:
go 1.9:
go_version: "1.9"
go 1.10:
go_version: "1.10"
go 1.11 (on):
go_version: "1.11"
GO111MODULE: "on"
go 1.11 (off):
go_version: "1.11"
GO111MODULE: "off"
steps:
- template: azure-tests.yml
19 changes: 19 additions & 0 deletions azure-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
steps:
- task: GoTool@0
inputs:
version: $(go_version)
- task: Bash@3
inputs:
targetType: inline
script: |
mkdir -p "$(GOBIN)"
mkdir -p "$(GOPATH)/pkg"
mkdir -p "$(modulePath)"
shopt -s extglob
mv !(gopath) "$(modulePath)"
displayName: "Setup Go Workspace"
- script: |
go get -t -v ./...
go test -race ./...
workingDirectory: "$(modulePath)"
displayName: "Tests"

0 comments on commit 905bd74

Please sign in to comment.