diff --git a/.azure-pipelines-ci/ci.yaml b/.azure-pipelines-ci/ci.yaml index 0bc0c316b..7cf89937a 100644 --- a/.azure-pipelines-ci/ci.yaml +++ b/.azure-pipelines-ci/ci.yaml @@ -34,6 +34,13 @@ stages: vmImage: vs2017-win2016 Windows_Server2019_PowerShell_Core: vmImage: windows-2019 + pool: + vmImage: $[ variables['vmImage'] ] + steps: + - template: templates/test-pwsh.yaml + - job: + strategy: + matrix: Windows_Server2016_PowerShell_5_1: vmImage: vs2017-win2016 pwsh: false @@ -43,4 +50,4 @@ stages: pool: vmImage: $[ variables['vmImage'] ] steps: - - template: templates/test.yaml + - template: templates/test-powershell.yaml diff --git a/.azure-pipelines-ci/templates/test.yaml b/.azure-pipelines-ci/templates/test-powershell.yaml similarity index 85% rename from .azure-pipelines-ci/templates/test.yaml rename to .azure-pipelines-ci/templates/test-powershell.yaml index 55cea8a41..e832f04e4 100644 --- a/.azure-pipelines-ci/templates/test.yaml +++ b/.azure-pipelines-ci/templates/test-powershell.yaml @@ -1,8 +1,3 @@ -parameters: -- name: pwsh - type: boolean - default: true - steps: - task: DownloadPipelineArtifact@2 displayName: 'Download Pipeline Artifact: out Folder' @@ -13,7 +8,7 @@ steps: displayName: 'Test' inputs: targetType: inline - pwsh: $[ parameters.pwsh ] + pwsh: false script: | Import-Module .\tools\appveyor.psm1 Invoke-AppveyorTest -CheckoutPath $env:BUILD_SOURCESDIRECTORY diff --git a/.azure-pipelines-ci/templates/test-pwsh.yaml b/.azure-pipelines-ci/templates/test-pwsh.yaml new file mode 100644 index 000000000..2661b2157 --- /dev/null +++ b/.azure-pipelines-ci/templates/test-pwsh.yaml @@ -0,0 +1,19 @@ +steps: +- task: DownloadPipelineArtifact@2 + displayName: 'Download Pipeline Artifact: out Folder' + inputs: + artifactName: out + targetPath: '$(Build.SourcesDirectory)/out' +- task: PowerShell@2 + displayName: 'Test' + inputs: + targetType: inline + pwsh: true + script: | + Import-Module .\tools\appveyor.psm1 + Invoke-AppveyorTest -CheckoutPath $env:BUILD_SOURCESDIRECTORY +- task: PublishTestResults@2 + inputs: + testRunner: NUnit + testResultsFiles: 'TestResults.xml' + condition: succeededOrFailed()