Skip to content

Commit

Permalink
Add option to ignore tests (#5109)
Browse files Browse the repository at this point in the history
  • Loading branch information
nohwnd authored Jun 18, 2024
1 parent 6b3b959 commit e4da2c1
Showing 1 changed file with 40 additions and 33 deletions.
73 changes: 40 additions & 33 deletions azure-pipelines-official.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ parameters:
displayName: "Run SDL validation"
type: boolean
default: False
# This option should be used with caution. This is useful for unblocking circular deps issue with testanywhere
- name: SkipTests
displayName: "Skip tests"
type: boolean
default: False

- name: otherOsPools
type: object
Expand Down Expand Up @@ -167,25 +172,26 @@ extends:
name: Build
displayName: Build

# -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
- ${{ 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

# 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 @@ -223,22 +229,23 @@ extends:
artifactName: PackageArtifacts
targetPath: '$(Build.SourcesDirectory)/artifacts/packages/Release/Shipping'

- script: ./test.sh
--configuration Release
--ci
--integrationTest
--performanceTest
name: Test
displayName: Test
- ${{ if eq(parameters.SkipTests, False) }}:
- 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 e4da2c1

Please sign in to comment.