mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-12-22 01:57:12 -05:00
40 lines
1.3 KiB
YAML
40 lines
1.3 KiB
YAML
jobs:
|
|
- job: ${{ parameters.name }}
|
|
timeoutInMinutes: 30
|
|
|
|
pool:
|
|
vmImage: ${{ parameters.vmImage }}
|
|
|
|
variables:
|
|
GOPATH: '$(system.defaultWorkingDirectory)'
|
|
GOBIN: '$(GOPATH)/bin'
|
|
|
|
steps:
|
|
- checkout: none
|
|
- task: GoTool@0
|
|
inputs:
|
|
version: '1.11.2'
|
|
- script: |
|
|
go version
|
|
go get -v -t -d v2ray.com/core/...
|
|
go get -v -t -d v2ray.com/ext/...
|
|
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 > 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)'
|
|
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
|