github.com/jdolitsky/cnab-go@v0.7.1-beta1/azure-pipelines.yml (about)

     1  pool:
     2    vmImage: 'Ubuntu 16.04'
     3  
     4  variables:
     5    GOBIN:  '$(GOPATH)/bin' # Go binaries path
     6    GOROOT: '/usr/local/go1.11' # Go installation path
     7    GOPATH: '$(system.defaultWorkingDirectory)/gopath' # Go workspace path
     8    modulePath: '$(GOPATH)/src/github.com/$(build.repository.name)' # Path to the module's code
     9  
    10  steps:
    11  - script: |
    12      mkdir -p '$(GOBIN)'
    13      mkdir -p '$(GOPATH)/pkg'
    14      mkdir -p '$(modulePath)'
    15      shopt -s extglob
    16      mv !(gopath) '$(modulePath)'
    17      echo '##vso[task.prependpath]$(GOBIN)'
    18      echo '##vso[task.prependpath]$(GOROOT)/bin'
    19    displayName: 'Set up the Go workspace'
    20  
    21  - script: |
    22      go version
    23      go get -v -t -d ./...
    24      make bootstrap build test lint coverage
    25    workingDirectory: '$(modulePath)'
    26    displayName: 'Get dependencies, build, test'
    27  
    28  - task: PublishTestResults@2
    29    inputs:
    30      testRunner: JUnit
    31      testResultsFiles: $(System.DefaultWorkingDirectory)/**/report.xml
    32  
    33  - task: PublishCodeCoverageResults@1
    34    inputs:
    35      codeCoverageTool: Cobertura 
    36      summaryFileLocation: $(System.DefaultWorkingDirectory)/**/coverage.xml