Skip to content

Commit a5105d3

Browse files
authored
allow tests to be skipped in signed build (dotnet#1167)
1 parent 8c60f42 commit a5105d3

File tree

1 file changed

+17
-4
lines changed

1 file changed

+17
-4
lines changed

azure-pipelines.yml

+17-4
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ stages:
4545
${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
4646
name: NetCoreInternal-Pool
4747
queue: buildpool.windows.10.amd64.vs2019
48-
timeoutInMinutes: 300
48+
timeoutInMinutes: 90
4949
variables:
5050
# Enable signing for internal, non-PR builds
5151
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
@@ -76,6 +76,10 @@ stages:
7676
value: Test
7777
- name: _BuildArgs
7878
value: /p:SignType=$(_SignType)
79+
# SkipTests
80+
- ${{ if ne(variables['SkipTests'], 'true') }}:
81+
- name: _TestArgs
82+
value: -test
7983
steps:
8084
- script: git config --global core.longpaths true
8185
displayName: Enable `git clean` to handle long paths
@@ -110,7 +114,7 @@ stages:
110114
-configuration $(_BuildConfig)
111115
-prepareMachine
112116
-sign
113-
-test
117+
$(_TestArgs)
114118
$(_BuildArgs)
115119
displayName: Build / Test
116120
env:
@@ -119,6 +123,7 @@ stages:
119123
- script: npm run ciTest
120124
displayName: NPM tests
121125
workingDirectory: "$(Build.SourcesDirectory)/src/Microsoft.DotNet.Interactive.Js"
126+
condition: ne(variables['SkipTests'], 'true')
122127

123128
# build and test VS Code extension
124129
- script: npm install
@@ -128,6 +133,7 @@ stages:
128133
- script: npm run ciTest
129134
displayName: npm test (VS Code stable)
130135
workingDirectory: "$(Build.SourcesDirectory)/src/dotnet-interactive-vscode/stable"
136+
condition: ne(variables['SkipTests'], 'true')
131137

132138
- script: npm install
133139
displayName: npm install (VS Code insiders)
@@ -136,6 +142,7 @@ stages:
136142
- script: npm run ciTest
137143
displayName: npm test (VS Code insiders)
138144
workingDirectory: "$(Build.SourcesDirectory)/src/dotnet-interactive-vscode/insiders"
145+
condition: ne(variables['SkipTests'], 'true')
139146

140147
# build and test npm package
141148
- script: npm install
@@ -145,6 +152,7 @@ stages:
145152
- script: npm run ciTest
146153
displayName: npm test (npm package)
147154
workingDirectory: "$(Build.SourcesDirectory)/src/dotnet-interactive-npm"
155+
condition: ne(variables['SkipTests'], 'true')
148156

149157
# publish VS Code and npm test results
150158
- task: PublishTestResults@2
@@ -231,6 +239,10 @@ stages:
231239
value: Test
232240
- name: _BuildArgs
233241
value: /p:SignType=$(_SignType)
242+
# SkipTests
243+
- ${{ if ne(variables['SkipTests'], 'true') }}:
244+
- name: _TestArgs
245+
value: --test
234246
steps:
235247
- script: git config --global core.longpaths true
236248
displayName: Enable `git clean` to handle long paths
@@ -258,14 +270,15 @@ stages:
258270
- script: ./eng/cibuild.sh
259271
--configuration $(_BuildConfig)
260272
--prepareMachine
261-
--test
273+
$(_TestArgs)
262274
displayName: Build / Test
263275
env:
264276
TRYDOTNET_PACKAGES_PATH: $(TryDotNetPackagesPath)
265277

266278
- script: npm run ciTest
267279
displayName: NPM tests
268280
workingDirectory: "$(Build.SourcesDirectory)/src/Microsoft.DotNet.Interactive.Js"
281+
condition: ne(variables['SkipTests'], 'true')
269282

270283
- template: /eng/common/templates/jobs/jobs.yml
271284
parameters:
@@ -321,7 +334,7 @@ stages:
321334
jobs:
322335
- job: IntegrationTest
323336
dependsOn: Windows_NT
324-
condition: succeeded()
337+
condition: and(succeeded(), ne(variables['SkipTests'], 'true'))
325338
pool:
326339
vmImage: ubuntu-latest
327340
variables:

0 commit comments

Comments
 (0)