1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-11-16 09:26:21 -05:00
v2fly/azure-pipelines.template.yml

40 lines
1.3 KiB
YAML
Raw Normal View History

2018-11-12 16:37:44 -05:00
jobs:
- job: ${{ parameters.name }}
timeoutInMinutes: 30
pool:
vmImage: ${{ parameters.vmImage }}
variables:
GOPATH: '$(system.defaultWorkingDirectory)'
2019-01-18 09:10:03 -05:00
GOBIN: '$(GOPATH)/bin'
2018-11-12 16:37:44 -05:00
steps:
- checkout: none
2018-11-12 17:58:26 -05:00
- task: GoTool@0
2018-11-12 18:00:12 -05:00
inputs:
2019-02-01 10:53:21 -05:00
version: '1.11.5'
2018-11-12 16:37:44 -05:00
- script: |
go version
go get -v -t -d v2ray.com/core/...
go get -v -t -d v2ray.com/ext/...
2019-01-18 09:05:45 -05:00
go get -u github.com/jstemmer/go-junit-report
2018-11-12 16:37:44 -05:00
workingDirectory: '$(system.defaultWorkingDirectory)'
displayName: 'Fetch sources'
- script: |
2019-01-18 09:10:03 -05:00
go test -p 1 -timeout 30m -v v2ray.com/core/... 2>&1 | $(GOBIN)/go-junit-report > report.xml
2018-11-12 16:37:44 -05:00
workingDirectory: '$(system.defaultWorkingDirectory)'
2019-01-18 09:22:15 -05:00
displayName: 'Test & Generate Report'
condition: in(variables['Agent.OS'], 'Linux')
- script: |
go test -p 1 -timeout 30m -v v2ray.com/core/...
workingDirectory: '$(system.defaultWorkingDirectory)'
2018-11-12 16:37:44 -05:00
displayName: 'Test'
2019-01-18 10:42:22 -05:00
condition: in(variables['Agent.OS'], 'Windows_NT', 'Darwin')
2019-01-18 09:04:56 -05:00
- task: PublishTestResults@2
2019-01-18 09:22:15 -05:00
condition: in(variables['Agent.OS'], 'Linux')
2019-01-18 09:04:56 -05:00
inputs:
testResultsFormat: 'JUnit' # Options: JUnit, NUnit, VSTest, xUnit
testResultsFiles: 'report.xml'
searchFolder: '$(System.DefaultWorkingDirectory)' # Optional