Skip to content

Commit e4da2c1

Browse files
authored
Add option to ignore tests (#5109)
1 parent 6b3b959 commit e4da2c1

File tree

1 file changed

+40
-33
lines changed

1 file changed

+40
-33
lines changed

azure-pipelines-official.yml

+40-33
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,11 @@ parameters:
4242
displayName: "Run SDL validation"
4343
type: boolean
4444
default: False
45+
# This option should be used with caution. This is useful for unblocking circular deps issue with testanywhere
46+
- name: SkipTests
47+
displayName: "Skip tests"
48+
type: boolean
49+
default: False
4550

4651
- name: otherOsPools
4752
type: object
@@ -167,25 +172,26 @@ extends:
167172
name: Build
168173
displayName: Build
169174

170-
# -ci is allowing to import some environment variables and some required configurations
171-
# -nobl avoid overwriting binlog of the main Build
172-
- script: Test.cmd
173-
-configuration Release
174-
-ci
175-
-nobl
176-
-integrationTest
177-
-performanceTest
178-
name: Test
179-
displayName: Test
175+
- ${{ if eq(parameters.SkipTests, False) }}:
176+
# -ci is allowing to import some environment variables and some required configurations
177+
# -nobl avoid overwriting binlog of the main Build
178+
- script: Test.cmd
179+
-configuration Release
180+
-ci
181+
-nobl
182+
-integrationTest
183+
-performanceTest
184+
name: Test
185+
displayName: Test
180186

181-
# This step is only helpful for diagnosing some issues with vstest/test host that would not appear
182-
# through the console or trx
183-
- task: 1ES.PublishBuildArtifacts@1
184-
displayName: 'Publish Test Results folders'
185-
inputs:
186-
PathtoPublish: '$(Build.SourcesDirectory)/artifacts/TestResults/Release'
187-
ArtifactName: TestResults
188-
condition: failed()
187+
# This step is only helpful for diagnosing some issues with vstest/test host that would not appear
188+
# through the console or trx
189+
- task: 1ES.PublishBuildArtifacts@1
190+
displayName: 'Publish Test Results folders'
191+
inputs:
192+
PathtoPublish: '$(Build.SourcesDirectory)/artifacts/TestResults/Release'
193+
ArtifactName: TestResults
194+
condition: failed()
189195

190196
- task: 1ES.PublishBuildArtifacts@1
191197
displayName: 'Publish VSSetup'
@@ -223,22 +229,23 @@ extends:
223229
artifactName: PackageArtifacts
224230
targetPath: '$(Build.SourcesDirectory)/artifacts/packages/Release/Shipping'
225231

226-
- script: ./test.sh
227-
--configuration Release
228-
--ci
229-
--integrationTest
230-
--performanceTest
231-
name: Test
232-
displayName: Test
232+
- ${{ if eq(parameters.SkipTests, False) }}:
233+
- script: ./test.sh
234+
--configuration Release
235+
--ci
236+
--integrationTest
237+
--performanceTest
238+
name: Test
239+
displayName: Test
233240

234-
# This step is only helpful for diagnosing some issues with vstest/test host that would not appear
235-
# through the console or trx
236-
- task: 1ES.PublishBuildArtifacts@1
237-
displayName: 'Publish Test Results folders'
238-
inputs:
239-
PathtoPublish: '$(Build.SourcesDirectory)/artifacts/TestResults/Release'
240-
ArtifactName: TestResults
241-
condition: failed()
241+
# This step is only helpful for diagnosing some issues with vstest/test host that would not appear
242+
# through the console or trx
243+
- task: 1ES.PublishBuildArtifacts@1
244+
displayName: 'Publish Test Results folders'
245+
inputs:
246+
PathtoPublish: '$(Build.SourcesDirectory)/artifacts/TestResults/Release'
247+
ArtifactName: TestResults
248+
condition: failed()
242249

243250
- job: Publish
244251
dependsOn:

0 commit comments

Comments
 (0)