Browse Source

run test in azure pipeline

Darien Raymond 7 years ago
parent
commit
ab7930c09b
1 changed files with 2 additions and 9 deletions
  1. 2 9
      azure-pipelines.yml

+ 2 - 9
azure-pipelines.yml

@@ -7,15 +7,11 @@ pool:
   vmImage: 'Ubuntu 16.04'
   vmImage: 'Ubuntu 16.04'
 
 
 variables:
 variables:
-  GOBIN:  '$(GOPATH)/bin' # Go binaries path
-  GOROOT: '/usr/local/go1.11' # Go installation path
   GOPATH: '$(system.defaultWorkingDirectory)/gopath' # Go workspace path
   GOPATH: '$(system.defaultWorkingDirectory)/gopath' # Go workspace path
   modulePath: '$(GOPATH)/src/v2ray.com/core' # Path to the module's code
   modulePath: '$(GOPATH)/src/v2ray.com/core' # Path to the module's code
 
 
 steps:
 steps:
 - script: |
 - script: |
-    mkdir -p '$(GOBIN)'
-    mkdir -p '$(GOPATH)/pkg'
     mkdir -p '$(modulePath)'
     mkdir -p '$(modulePath)'
     shopt -s extglob
     shopt -s extglob
     mv !(gopath) '$(modulePath)'
     mv !(gopath) '$(modulePath)'
@@ -24,12 +20,9 @@ steps:
   displayName: 'Set up the Go workspace'
   displayName: 'Set up the Go workspace'
 
 
 - script: |
 - script: |
+    set -x
     go version
     go version
     go get -v -t -d ./...
     go get -v -t -d ./...
-    if [ -f Gopkg.toml ]; then
-        curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
-        dep ensure
-    fi
-    go build -v .
+    go test -p 1 -tags json -v v2ray.com/core/...
   workingDirectory: '$(modulePath)'
   workingDirectory: '$(modulePath)'
   displayName: 'Get dependencies, then build'
   displayName: 'Get dependencies, then build'