Skip to content

Commit

Permalink
Allow skipping tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nohwnd committed Mar 27, 2024
1 parent adc5c76 commit dc69e7b
Showing 1 changed file with 40 additions and 35 deletions.
75 changes: 40 additions & 35 deletions azure-pipelines-official.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ parameters:
displayName: "Run SDL validation"
type: boolean
default: False
- name: SkipTests
displayName: "Skip tests"
type: boolean
default: False

- name: otherOsPools
type: object
Expand Down Expand Up @@ -165,26 +169,26 @@ extends:
/p:SourceBranchName=$(Build.SourceBranchName)
name: Build
displayName: Build
- ${{ if eq(parameters.SkipTests, False) }}:
# -ci is allowing to import some environment variables and some required configurations
# -nobl avoid overwriting binlog of the main Build
- script: Test.cmd
-configuration Release
-ci
-nobl
-integrationTest
-performanceTest
name: Test
displayName: Test

# -ci is allowing to import some environment variables and some required configurations
# -nobl avoid overwriting binlog of the main Build
- script: Test.cmd
-configuration Release
-ci
-nobl
-integrationTest
-performanceTest
name: Test
displayName: Test

# This step is only helpful for diagnosing some issues with vstest/test host that would not appear
# through the console or trx
- task: 1ES.PublishBuildArtifacts@1
displayName: 'Publish Test Results folders'
inputs:
PathtoPublish: '$(Build.SourcesDirectory)/artifacts/TestResults/Release'
ArtifactName: TestResults
condition: failed()
# This step is only helpful for diagnosing some issues with vstest/test host that would not appear
# through the console or trx
- task: 1ES.PublishBuildArtifacts@1
displayName: 'Publish Test Results folders'
inputs:
PathtoPublish: '$(Build.SourcesDirectory)/artifacts/TestResults/Release'
ArtifactName: TestResults
condition: failed()

- task: 1ES.PublishBuildArtifacts@1
displayName: 'Publish VSSetup'
Expand Down Expand Up @@ -221,23 +225,24 @@ extends:
inputs:
artifactName: PackageArtifacts
targetPath: '$(Build.SourcesDirectory)/artifacts/packages/Release/Shipping'

- ${{ if eq(parameters.SkipTests, False) }}:
- script: ./test.sh
--configuration Release
--ci
--integrationTest
--performanceTest
name: Test
displayName: Test

- script: ./test.sh
--configuration Release
--ci
--integrationTest
--performanceTest
name: Test
displayName: Test

# This step is only helpful for diagnosing some issues with vstest/test host that would not appear
# through the console or trx
- task: 1ES.PublishBuildArtifacts@1
displayName: 'Publish Test Results folders'
inputs:
PathtoPublish: '$(Build.SourcesDirectory)/artifacts/TestResults/Release'
ArtifactName: TestResults
condition: failed()
# This step is only helpful for diagnosing some issues with vstest/test host that would not appear
# through the console or trx
- task: 1ES.PublishBuildArtifacts@1
displayName: 'Publish Test Results folders'
inputs:
PathtoPublish: '$(Build.SourcesDirectory)/artifacts/TestResults/Release'
ArtifactName: TestResults
condition: failed()

- job: Publish
dependsOn:
Expand Down

0 comments on commit dc69e7b

Please sign in to comment.