Skip to content

Commit 3b79f5d

Browse files
committed
Test release config, split out restore & build
1 parent 7c9dc23 commit 3b79f5d

File tree

3 files changed

+78
-40
lines changed

3 files changed

+78
-40
lines changed

eng/ci/templates/jobs/run-unit-tests.yml

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,34 @@ jobs:
22
- job: RunUnitTests
33
displayName: Run Unit Tests
44

5+
variables:
6+
- name: test_projects
7+
value: |
8+
**\ExtensionsMetadataGeneratorTests.csproj
9+
**\WebJobs.Script.Tests.csproj
10+
511
steps:
612
- template: /eng/ci/templates/install-dotnet.yml@self
713

14+
- task: DotNetCoreCLI@2
15+
displayName: Restore
16+
inputs:
17+
command: custom
18+
custom: restore
19+
arguments: -v m
20+
projects: $(test_projects)
21+
22+
- task: DotNetCoreCLI@2
23+
displayName: Build
24+
inputs:
25+
command: build
26+
arguments: -v m -c release --no-restore
27+
projects: $(test_projects)
28+
829
- task: DotNetCoreCLI@2
930
displayName: Unit Tests
1031
inputs:
1132
command: test
1233
testRunTitle: Unit Tests
13-
arguments: -v n
14-
projects: |
15-
**\ExtensionsMetadataGeneratorTests.csproj
16-
**\WebJobs.Script.Tests.csproj
34+
arguments: -v m -c release --no-build
35+
projects: $(test_projects)

eng/ci/templates/official/jobs/run-integration-tests.yml

Lines changed: 41 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ jobs:
88
os: windows
99

1010
variables:
11-
IntegrationProject: test/WebJobs.Script.Tests.Integration/WebJobs.Script.Tests.Integration.csproj
12-
IsReleaseBranch: $[contains(variables['Build.SourceBranch'], 'release/')]
11+
test_projects: test/WebJobs.Script.Tests.Integration/WebJobs.Script.Tests.Integration.csproj
12+
is_release: $[contains(variables['Build.SourceBranch'], 'release/')]
13+
test_args: -c release --no-build
1314

1415
steps:
1516
- template: /eng/ci/templates/install-dotnet.yml@self
@@ -79,99 +80,108 @@ jobs:
7980
AzureWebJobsEventHubReceiverSecretMap: $(EventHub)
8081

8182
- task: DotNetCoreCLI@2
82-
displayName: Build Integration.csproj
83+
displayName: Restore
84+
inputs:
85+
command: custom
86+
custom: restore
87+
arguments: -v m
88+
projects: $(test_projects)
89+
90+
- task: DotNetCoreCLI@2
91+
displayName: Build
8392
inputs:
8493
command: build
85-
projects: $(IntegrationProject)
94+
arguments: -v m -c release --no-restore
95+
projects: $(test_projects)
8696

8797
- task: DotNetCoreCLI@2
8898
displayName: C# end to end tests
8999
inputs:
90100
command: test
91101
testRunTitle: C# end to end tests
92-
arguments: '--filter "Group=CSharpEndToEndTests" --no-build'
93-
projects: $(IntegrationProject)
102+
arguments: '--filter "Group=CSharpEndToEndTests" $(test_args)'
103+
projects: $(test_projects)
94104

95105
- task: DotNetCoreCLI@2
96106
displayName: Node end to end tests
97107
condition: succeededOrFailed()
98108
inputs:
99109
command: test
100110
testRunTitle: Node end to end tests
101-
arguments: '--filter "Group=NodeEndToEndTests" --no-build'
102-
projects: $(IntegrationProject)
111+
arguments: '--filter "Group=NodeEndToEndTests" $(test_args)'
112+
projects: $(test_projects)
103113

104114
- task: DotNetCoreCLI@2
105115
displayName: Direct load end to end tests
106116
condition: succeededOrFailed()
107117
inputs:
108118
command: test
109119
testRunTitle: Direct load end to end tests
110-
arguments: '--filter "Group=DirectLoadEndToEndTests" --no-build'
111-
projects: $(IntegrationProject)
120+
arguments: '--filter "Group=DirectLoadEndToEndTests" $(test_args)'
121+
projects: $(test_projects)
112122

113123
- task: DotNetCoreCLI@2
114124
displayName: F# end to end tests
115125
condition: succeededOrFailed()
116126
inputs:
117127
command: test
118128
testRunTitle: F# end to end tests
119-
arguments: '--filter "Group=FSharpEndToEndTests" --no-build'
120-
projects: $(IntegrationProject)
129+
arguments: '--filter "Group=FSharpEndToEndTests" $(test_args)'
130+
projects: $(test_projects)
121131

122132
- task: DotNetCoreCLI@2
123133
displayName: Language worker end to end tests
124134
condition: succeededOrFailed()
125135
inputs:
126136
command: test
127137
testRunTitle: Language worker end to end tests
128-
arguments: '--filter "Group=LanguageWorkerSelectionEndToEndTests" --no-build'
129-
projects: $(IntegrationProject)
138+
arguments: '--filter "Group=LanguageWorkerSelectionEndToEndTests" $(test_args)'
139+
projects: $(test_projects)
130140

131141
- task: DotNetCoreCLI@2
132142
displayName: Node script host end to end tests
133143
condition: succeededOrFailed()
134144
inputs:
135145
command: test
136146
testRunTitle: Node script host end to end tests
137-
arguments: '--filter "Group=NodeScriptHostTests" --no-build'
138-
projects: $(IntegrationProject)
147+
arguments: '--filter "Group=NodeScriptHostTests" $(test_args)'
148+
projects: $(test_projects)
139149

140150
- task: DotNetCoreCLI@2
141151
displayName: Raw assembly end to end tests
142152
condition: succeededOrFailed()
143153
inputs:
144154
command: test
145155
testRunTitle: Raw assembly end to end tests
146-
arguments: '--filter "Group=RawAssemblyEndToEndTests" --no-build'
147-
projects: $(IntegrationProject)
156+
arguments: '--filter "Group=RawAssemblyEndToEndTests" $(test_args)'
157+
projects: $(test_projects)
148158

149159
- task: DotNetCoreCLI@2
150160
displayName: Samples end to end tests
151161
condition: succeededOrFailed()
152162
inputs:
153163
command: test
154164
testRunTitle: Samples end to end tests
155-
arguments: '--filter "Group=SamplesEndToEndTests" --no-build'
156-
projects: $(IntegrationProject)
165+
arguments: '--filter "Group=SamplesEndToEndTests" $(test_args)'
166+
projects: $(test_projects)
157167

158168
- task: DotNetCoreCLI@2
159169
displayName: Drain mode end to end tests
160170
condition: succeededOrFailed()
161171
inputs:
162172
command: test
163173
testRunTitle: Drain mode end to end tests
164-
arguments: '--filter "Group=DrainModeEndToEndTests" --no-build'
165-
projects: $(IntegrationProject)
174+
arguments: '--filter "Group=DrainModeEndToEndTests" $(test_args)'
175+
projects: $(test_projects)
166176

167177
- task: DotNetCoreCLI@2
168178
displayName: Standby mode end to end tests Windows
169179
condition: succeededOrFailed()
170180
inputs:
171181
command: test
172182
testRunTitle: Standby mode end to end tests Windows
173-
arguments: '--filter "Group=StandbyModeEndToEndTests_Windows" --no-build'
174-
projects: $(IntegrationProject)
183+
arguments: '--filter "Group=StandbyModeEndToEndTests_Windows" $(test_args)'
184+
projects: $(test_projects)
175185

176186
# Disabled to unblock in 202401. Will fix shortly.
177187
# - task: DotNetCoreCLI@2
@@ -180,26 +190,26 @@ jobs:
180190
# inputs:
181191
# command: test
182192
# testRunTitle: Standby mode end to end tests Linux
183-
# arguments: '--filter "Group=StandbyModeEndToEndTests_Linux" --no-build'
184-
# projects: $(IntegrationProject)
193+
# arguments: '--filter "Group=StandbyModeEndToEndTests_Linux" $(test_args)'
194+
# projects: $(test_projects)
185195

186196
- task: DotNetCoreCLI@2
187197
displayName: Linux container end to end tests Windows
188198
condition: succeededOrFailed()
189199
inputs:
190200
command: test
191201
testRunTitle: Linux container end to end tests Windows
192-
arguments: '--filter "Group=ContainerInstanceTests" --no-build'
193-
projects: $(IntegrationProject)
202+
arguments: '--filter "Group=ContainerInstanceTests" $(test_args)'
203+
projects: $(test_projects)
194204

195205
- task: DotNetCoreCLI@2
196206
displayName: Release verification tests
197-
condition: ${{ eq(variables.IsReleaseBranch, true) }}
207+
condition: ${{ eq(variables.is_release, true) }}
198208
inputs:
199209
command: test
200210
testRunTitle: Release verification tests
201-
arguments: '--filter "Group=ReleaseTests" --no-build'
202-
projects: $(IntegrationProject)
211+
arguments: '--filter "Group=ReleaseTests" $(test_args)'
212+
projects: $(test_projects)
203213

204214
- task: PowerShell@2
205215
condition: always()

eng/ci/templates/official/jobs/run-non-e2e-tests.yml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
os: windows
99

1010
variables:
11-
IntegrationProject: test/WebJobs.Script.Tests.Integration/WebJobs.Script.Tests.Integration.csproj
11+
test_projects: test/WebJobs.Script.Tests.Integration/WebJobs.Script.Tests.Integration.csproj
1212

1313
steps:
1414
- template: /eng/ci/templates/install-dotnet.yml@self
@@ -50,18 +50,27 @@ jobs:
5050
secretsFilter: '*'
5151

5252
- task: DotNetCoreCLI@2
53-
displayName: Build Integration.csproj
53+
displayName: Restore
54+
inputs:
55+
command: custom
56+
custom: restore
57+
arguments: -v m
58+
projects: $(test_projects)
59+
60+
- task: DotNetCoreCLI@2
61+
displayName: Build
5462
inputs:
5563
command: build
56-
projects: $(IntegrationProject)
64+
arguments: -v m -c release --no-restore
65+
projects: $(test_projects)
5766

5867
- task: DotNetCoreCLI@2
5968
displayName: Non-E2E integration tests
6069
inputs:
6170
command: test
6271
testRunTitle: Non-E2E integration tests
63-
arguments: '--filter "Category!=E2E"'
64-
projects: $(IntegrationProject)
72+
arguments: '--filter "Category!=E2E" -c release --no-build'
73+
projects: $(test_projects)
6574
env:
6675
AzureWebJobsStorage: $(Storage)
6776
AzureWebJobsSecondaryStorage: $(SecondaryStorage)

0 commit comments

Comments
 (0)