mirror of
https://github.com/Microsoft/calculator.git
synced 2025-08-20 21:33:10 -07:00
Move unit test runs to hosted pools (#671)
We can now run our unit tests in the Hosted VS2019 pool since bugs have been fixed in the version of Visual Studio deployed on those agents.
This commit is contained in:
parent
f0b51ae1ee
commit
d6d5591148
3 changed files with 5 additions and 41 deletions
|
@ -41,15 +41,9 @@ jobs:
|
|||
- template: ./templates/run-unit-tests.yaml
|
||||
parameters:
|
||||
platform: x64
|
||||
reimageServiceConnection: essential-experiences-interactive-reimage
|
||||
reimageSubscriptionId: a8f5eb47-e59c-44b4-8e42-e70811a047b5
|
||||
reimageResourceGroup: EETestPublic
|
||||
|
||||
- template: ./templates/run-unit-tests.yaml
|
||||
parameters:
|
||||
platform: x86
|
||||
reimageServiceConnection: essential-experiences-interactive-reimage
|
||||
reimageSubscriptionId: a8f5eb47-e59c-44b4-8e42-e70811a047b5
|
||||
reimageResourceGroup: EETestPublic
|
||||
|
||||
- template: ./templates/package-appxbundle.yaml
|
||||
|
|
|
@ -48,16 +48,10 @@ jobs:
|
|||
- template: ./templates/run-unit-tests.yaml
|
||||
parameters:
|
||||
platform: x64
|
||||
reimageServiceConnection: macool-sandbox-interactiveDesktopRS5
|
||||
reimageSubscriptionId: 012a8008-c00f-45b3-9828-41ebba30141d
|
||||
reimageResourceGroup: interactiveDesktopRS5
|
||||
|
||||
- template: ./templates/run-unit-tests.yaml
|
||||
parameters:
|
||||
platform: x86
|
||||
reimageServiceConnection: macool-sandbox-interactiveDesktopRS5
|
||||
reimageSubscriptionId: 012a8008-c00f-45b3-9828-41ebba30141d
|
||||
reimageResourceGroup: interactiveDesktopRS5
|
||||
|
||||
- template: ./templates/package-appxbundle.yaml
|
||||
|
||||
|
|
|
@ -1,30 +1,21 @@
|
|||
# This template contains jobs to run unit tests on the interactive test agents.
|
||||
# This template contains jobs to run unit tests.
|
||||
|
||||
parameters:
|
||||
platform: ''
|
||||
reimageServiceConnection: ''
|
||||
reimageSubscriptionId: ''
|
||||
reimageResourceGroup: ''
|
||||
runsettingsFileName: ''
|
||||
|
||||
jobs:
|
||||
- job: UnitTests${{ parameters.platform }}
|
||||
displayName: UnitTests ${{ parameters.platform }}
|
||||
dependsOn: Build${{ parameters.platform }}
|
||||
condition: succeeded()
|
||||
pool:
|
||||
name: Essential Experiences Interactive
|
||||
workspace:
|
||||
clean: outputs
|
||||
vmImage: windows-2019
|
||||
variables:
|
||||
skipComponentGovernanceDetection: true
|
||||
steps:
|
||||
- checkout: none
|
||||
|
||||
- powershell: Write-Host "##vso[task.setvariable variable=agentInstanceId;isOutput=true]$($env:AgentName -replace '\D+' -as [int])"
|
||||
name: LogAgentStep
|
||||
displayName: Log this agent's instance for later cleanup
|
||||
env:
|
||||
AgentName: $(Agent.Name)
|
||||
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download CalculatorUnitTests
|
||||
inputs:
|
||||
|
@ -42,18 +33,3 @@ jobs:
|
|||
inputs:
|
||||
testAssemblyVer2: $(Build.ArtifactStagingDirectory)\drop\Release\${{ parameters.platform }}\CalculatorUnitTests\AppPackages\CalculatorUnitTests_Test\CalculatorUnitTests.appx
|
||||
otherConsoleOptions: /Platform:${{ parameters.platform }}
|
||||
|
||||
- job: CleanUpUnitTests${{ parameters.platform }}
|
||||
dependsOn: UnitTests${{ parameters.platform }}
|
||||
condition: and(always(), ne(dependencies.UnitTests${{ parameters.platform }}.Outputs['LogAgentStep.agentInstanceId'], ''))
|
||||
pool: server
|
||||
variables:
|
||||
agentInstanceId: $[ dependencies.UnitTests${{ parameters.platform }}.outputs['LogAgentStep.agentInstanceId'] ]
|
||||
steps:
|
||||
- task: InvokeRESTAPI@1
|
||||
displayName: Reimage test machine
|
||||
inputs:
|
||||
connectionType: connectedServiceNameARM
|
||||
azureServiceConnection: ${{ parameters.reimageServiceConnection }}
|
||||
urlSuffix: subscriptions/${{ parameters.reimageSubscriptionId }}/resourceGroups/${{ parameters.reimageResourceGroup }}/providers/Microsoft.Compute/virtualMachineScaleSets/essential/reimage?api-version=2018-10-01
|
||||
body: '{ "instanceIds": ["$(agentInstanceId)"] }'
|
Loading…
Add table
Add a link
Reference in a new issue