From 226259d58d78e44a28c218611d7fca2a1ec9eb0d Mon Sep 17 00:00:00 2001 From: Christoph Bergmeister Date: Mon, 27 Apr 2020 22:37:03 +0100 Subject: [PATCH] try split test template --- .azure-pipelines-ci/ci.yaml | 11 ++++++++++- .../{test.yaml => test-powershell.yaml} | 7 +------ .azure-pipelines-ci/templates/test-pwsh.yaml | 19 +++++++++++++++++++ 3 files changed, 30 insertions(+), 7 deletions(-) rename .azure-pipelines-ci/templates/{test.yaml => test-powershell.yaml} (85%) create mode 100644 .azure-pipelines-ci/templates/test-pwsh.yaml diff --git a/.azure-pipelines-ci/ci.yaml b/.azure-pipelines-ci/ci.yaml index 0bc0c316b..665ad345e 100644 --- a/.azure-pipelines-ci/ci.yaml +++ b/.azure-pipelines-ci/ci.yaml @@ -34,6 +34,15 @@ 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_Server2019_PowerShell_Core: + vmImage: windows-2019 Windows_Server2016_PowerShell_5_1: vmImage: vs2017-win2016 pwsh: false @@ -43,4 +52,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()