|
@@ -10,29 +10,11 @@ jobs:
|
|
|
GOBIN: '$(GOPATH)/bin'
|
|
GOBIN: '$(GOPATH)/bin'
|
|
|
|
|
|
|
|
steps:
|
|
steps:
|
|
|
- - checkout: none
|
|
|
|
|
|
|
+ - checkout: self
|
|
|
- task: GoTool@0
|
|
- task: GoTool@0
|
|
|
inputs:
|
|
inputs:
|
|
|
version: '1.11.5'
|
|
version: '1.11.5'
|
|
|
- script: |
|
|
- script: |
|
|
|
- go version
|
|
|
|
|
- go get -v -t -d v2ray.com/core/...
|
|
|
|
|
- go get -u github.com/jstemmer/go-junit-report
|
|
|
|
|
- workingDirectory: '$(system.defaultWorkingDirectory)'
|
|
|
|
|
- displayName: 'Fetch sources'
|
|
|
|
|
- - script: |
|
|
|
|
|
- go test -p 1 -timeout 30m -v v2ray.com/core/... 2>&1 | $(GOBIN)/go-junit-report -set-exit-code > report.xml
|
|
|
|
|
- workingDirectory: '$(system.defaultWorkingDirectory)'
|
|
|
|
|
- displayName: 'Test & Generate Report'
|
|
|
|
|
- condition: in(variables['Agent.OS'], 'Linux')
|
|
|
|
|
- - script: |
|
|
|
|
|
- go test -p 1 -timeout 30m -v v2ray.com/core/...
|
|
|
|
|
- workingDirectory: '$(system.defaultWorkingDirectory)'
|
|
|
|
|
|
|
+ go test -p 1 -v -timeout 30m ./...
|
|
|
|
|
+ workingDirectory: '$(Build.SourcesDirectory)'
|
|
|
displayName: 'Test'
|
|
displayName: 'Test'
|
|
|
- condition: in(variables['Agent.OS'], 'Windows_NT', 'Darwin')
|
|
|
|
|
- - task: PublishTestResults@2
|
|
|
|
|
- condition: in(variables['Agent.OS'], 'Linux')
|
|
|
|
|
- inputs:
|
|
|
|
|
- testResultsFormat: 'JUnit' # Options: JUnit, NUnit, VSTest, xUnit
|
|
|
|
|
- testResultsFiles: 'report.xml'
|
|
|
|
|
- searchFolder: '$(System.DefaultWorkingDirectory)' # Optional
|
|
|