github.com/ChicK00o/awgo@v0.29.4/azure-pipelines.yml (about)

     1  # https://docs.microsoft.com/azure/devops/pipelines/languages/go
     2  
     3  trigger:
     4    batch: true
     5    paths:
     6      exclude:
     7        - README.md
     8        - LICENCE
     9        - TODO
    10        - icon.*
    11        - env
    12        - bench.py
    13        - modd.conf
    14        - .gitignore
    15        - .travis.yml
    16        - bin/*
    17  
    18  pool:
    19    vmImage: 'macOS-latest'
    20  
    21  variables:
    22    GOBIN:  '$(GOPATH)/bin' # Go binaries path
    23    GOROOT: '/usr/local/opt/go/libexec' # Go installation path
    24    GOPATH: '$(system.defaultWorkingDirectory)/gopath' # Go workspace path
    25    BUILD_NUMBER: '$(Build.BuildNumber)'
    26    CI_PULL_REQUEST: '$(Build.SourceBranch)'
    27    CI_PKG_NAME: 'github.com/$(Build.Repository.Name)'
    28    modulePath: '$(GOPATH)/src/github.com/$(build.repository.name)' # Path to the module's code
    29  
    30  steps:
    31  - script: |
    32      mkdir -p '$(GOBIN)'
    33      mkdir -p '$(GOPATH)/pkg'
    34      mkdir -p '$(modulePath)'
    35      shopt -s extglob
    36      shopt -s dotglob
    37      mv !(gopath) '$(modulePath)'
    38      echo '##vso[task.prependpath]$(GOBIN)'
    39      echo '##vso[task.prependpath]$(GOROOT)/bin'
    40      go version
    41    displayName: 'Set up Go'
    42  
    43  - script: |
    44        go get -v -t -d ./...
    45    workingDirectory: '$(modulePath)'
    46    displayName: Fetch Code
    47  
    48  - script: |
    49      go get golang.org/x/lint/golint
    50      go get github.com/golangci/golangci-lint/cmd/golangci-lint
    51    workingDirectory: '$(modulePath)'
    52    displayName: Install Linters
    53  
    54  - script: |
    55      ./run-tests.sh -l
    56    workingDirectory: '$(modulePath)'
    57    displayName: Lint
    58  
    59  - script: |
    60      go get github.com/mfridman/tparse
    61    workingDirectory: '$(modulePath)'
    62    displayName: Install Test Dependences
    63  
    64  - script: |
    65      ./run-tests.sh -ic ./...
    66    workingDirectory: '$(modulePath)'
    67    displayName: Run Tests