Stop running tests in official builds (#63)

We shouldn't be running unit tests in official builds.

I created 4 scripts for clarity (PR/internalbuild.sh/cmd) and in case we would like to customize more in the future.

Fixes: https://github.com/dotnet/xharness/issues/58
This commit is contained in:
Přemek Vysoký 2020-04-23 17:52:17 +02:00 коммит произвёл GitHub
Родитель 3db4df0426
Коммит 354a4c7743
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 54 добавлений и 32 удалений

Просмотреть файл

@ -63,23 +63,34 @@ stages:
Debug:
_BuildConfig: Debug
steps:
- script: eng\common\cibuild.cmd
-configuration $(_BuildConfig)
-prepareMachine
$(_InternalBuildArgs)
name: Build
displayName: Build
condition: succeeded()
- ${{ if eq(variables._RunAsPublic, False) }}:
- script: eng\common\CIBuild.cmd
-configuration $(_BuildConfig)
-prepareMachine
$(_InternalBuildArgs)
/p:Test=false
name: Build
displayName: Build
condition: succeeded()
- task: PublishTestResults@2
displayName: 'Publish Unit Test Results'
inputs:
testResultsFormat: xUnit
testResultsFiles: '$(Build.SourcesDirectory)/artifacts/TestResults/**/*.xml'
mergeTestResults: true
searchFolder: $(system.defaultworkingdirectory)
testRunTitle: XHarness unit tests - $(Agent.JobName)
condition: succeededOrFailed()
- ${{ if eq(variables._RunAsPublic, True) }}:
- script: eng\common\CIBuild.cmd
-configuration $(_BuildConfig)
-prepareMachine
$(_InternalBuildArgs)
name: Build
displayName: Build and run tests
condition: succeeded()
- task: PublishTestResults@2
displayName: 'Publish Unit Test Results'
inputs:
testResultsFormat: xUnit
testResultsFiles: '$(Build.SourcesDirectory)/artifacts/TestResults/**/*.xml'
mergeTestResults: true
searchFolder: $(system.defaultworkingdirectory)
testRunTitle: XHarness unit tests - $(Agent.JobName)
condition: succeededOrFailed()
- task: PublishBuildArtifacts@1
displayName: Publish Logs to VSTS
@ -101,23 +112,34 @@ stages:
Debug:
_BuildConfig: Debug
steps:
- script: eng/common/cibuild.sh
--configuration $(_BuildConfig)
--prepareMachine
$(_InternalBuildArgs)
name: Build
displayName: Build
condition: succeeded()
- ${{ if eq(variables._RunAsPublic, False) }}:
- script: eng/common/cibuild.sh
--configuration $(_BuildConfig)
--prepareMachine
$(_InternalBuildArgs)
/p:Test=false
name: Build
displayName: Build
condition: succeeded()
- task: PublishTestResults@2
displayName: 'Publish Unit Test Results'
inputs:
testResultsFormat: xUnit
testResultsFiles: '$(Build.SourcesDirectory)/artifacts/TestResults/**/*.xml'
mergeTestResults: true
searchFolder: $(system.defaultworkingdirectory)
testRunTitle: XHarness unit tests - $(Agent.JobName)
condition: succeededOrFailed()
- ${{ if eq(variables._RunAsPublic, True) }}:
- script: eng/common/cibuild.sh
--configuration $(_BuildConfig)
--prepareMachine
$(_InternalBuildArgs)
name: Build
displayName: Build and run tests
condition: succeeded()
- task: PublishTestResults@2
displayName: 'Publish Unit Test Results'
inputs:
testResultsFormat: xUnit
testResultsFiles: '$(Build.SourcesDirectory)/artifacts/TestResults/**/*.xml'
mergeTestResults: true
searchFolder: $(system.defaultworkingdirectory)
testRunTitle: XHarness unit tests - $(Agent.JobName)
condition: succeededOrFailed()
- task: PublishBuildArtifacts@1
displayName: Publish Logs to VSTS