@@ -138,6 +138,14 @@ steps:
138
138
- ${{ parameters.AfterTestSteps }}
139
139
140
140
- pwsh : |
141
+ if ($IsWindows) {
142
+ . $(VENV_LOCATION)/Scripts/Activate.ps1
143
+ }
144
+ else {
145
+ . $(VENV_LOCATION)/bin/activate.ps1
146
+ }
147
+ Write-Host (Get-Command python).Source
148
+
141
149
python -m pip install coverage==7.2.5
142
150
python scripts/devops_tasks/create_coverage.py
143
151
displayName: Create Coverage Report
@@ -156,6 +164,13 @@ steps:
156
164
pwsh : true
157
165
ScriptType : InlineScript
158
166
Inline : >-
167
+ if ($IsWindows) {
168
+ . $(VENV_LOCATION)/Scripts/Activate.ps1
169
+ }
170
+ else {
171
+ . $(VENV_LOCATION)/bin/activate.ps1
172
+ }
173
+ Write-Host (Get-Command python).Source
159
174
$account = (Get-AzContext).Account;
160
175
$env:AZURESUBSCRIPTION_CLIENT_ID = $account.Id;
161
176
$env:AZURESUBSCRIPTION_TENANT_ID = $account.Tenants;
@@ -166,18 +181,22 @@ steps:
166
181
--toxenv="samples";
167
182
Write-Host "Last exit code: $LASTEXITCODE";
168
183
exit $LASTEXITCODE;
169
-
170
184
- ${{ else }} :
171
- - task : PythonScript@0
172
- displayName : ' Test Samples'
173
- condition : and(succeeded(), eq(variables['TestSamples'], 'true'))
174
- inputs :
175
- scriptPath : ' scripts/devops_tasks/dispatch_tox.py'
176
- arguments : >-
177
- "$(TargetingString)"
178
- --service="${{ parameters.ServiceDirectory }}"
185
+ - pwsh : |
186
+ if ($IsWindows) {
187
+ . $(VENV_LOCATION)/Scripts/Activate.ps1
188
+ }
189
+ else {
190
+ . $(VENV_LOCATION)/bin/activate.ps1
191
+ }
192
+ Write-Host (Get-Command python).Source
193
+ python scripts/devops_tasks/dispatch_tox.py "$(TargetingString)" `
194
+ --service="${{ parameters.ServiceDirectory }}" `
179
195
--toxenv="samples"
196
+ exit $LASTEXITCODE;
180
197
env: ${{ parameters.EnvVars }}
198
+ displayName: 'Test Samples'
199
+ condition: and(succeeded(), eq(variables['TestSamples'], 'true'))
181
200
182
201
- task : PublishTestResults@2
183
202
condition : always()
0 commit comments