diff --git a/.vsts-ci/linux.yml b/.vsts-ci/linux.yml index c29e2be864..ecc83ee813 100644 --- a/.vsts-ci/linux.yml +++ b/.vsts-ci/linux.yml @@ -84,3 +84,11 @@ jobs: parameters: pool: Hosted Ubuntu 1604 dependsOn: linux_build + +- job: CodeCovTestPackage + displayName: CodeCoverage and Test Packages + steps: + - powershell: | + Import-Module .\tools\ci.psm1 + New-CodeCoverageAndTestPackage + displayName: CodeCoverage and Test Package diff --git a/.vsts-ci/mac.yml b/.vsts-ci/mac.yml index d06fa406eb..2e72d6d779 100644 --- a/.vsts-ci/mac.yml +++ b/.vsts-ci/mac.yml @@ -78,3 +78,11 @@ jobs: parameters: pool: 'Hosted macOS' dependsOn: mac_build + +- job: CodeCovTestPackage + displayName: CodeCoverage and Test Packages + steps: + - powershell: | + Import-Module .\tools\ci.psm1 + New-CodeCoverageAndTestPackage + displayName: CodeCoverage and Test Package diff --git a/.vsts-ci/templates/windows-packaging.yml b/.vsts-ci/templates/windows-packaging.yml index b4e7c14c7d..df422b812d 100644 --- a/.vsts-ci/templates/windows-packaging.yml +++ b/.vsts-ci/templates/windows-packaging.yml @@ -29,6 +29,6 @@ jobs: - powershell: | Import-Module .\tools\ci.psm1 - Invoke-CIAfterTest + New-CodeCoverageAndTestPackage Invoke-CIFinish -NuGetKey $(NUGET_KEY) displayName: Build and Test Package diff --git a/build.psm1 b/build.psm1 index 6d3192e946..5059be3226 100644 --- a/build.psm1 +++ b/build.psm1 @@ -651,19 +651,10 @@ function New-PSOptions { # Add .NET CLI tools to PATH Find-Dotnet - $ConfigWarningMsg = "The passed-in Configuration value '{0}' is not supported on '{1}'. Use '{2}' instead." if (-not $Configuration) { $Configuration = 'Debug' - } else { - switch ($Configuration) { - "CodeCoverage" { - if(-not $Environment.IsWindows) { - $Configuration = "Debug" - Write-Warning ($ConfigWarningMsg -f $switch.Current, $Environment.LinuxInfo.PRETTY_NAME, $Configuration) - } - } - } } + Write-Verbose "Using configuration '$Configuration'" if (-not $Runtime) { diff --git a/tools/ci.psm1 b/tools/ci.psm1 index 82c523b043..216aa6a8a8 100644 --- a/tools/ci.psm1 +++ b/tools/ci.psm1 @@ -332,8 +332,7 @@ function Invoke-CITest Set-BuildVariable -Name TestPassed -Value True } -# Implement CI 'after_test' phase -function Invoke-CIAfterTest +function New-CodeCoverageAndTestPackage { [CmdletBinding()] param() @@ -742,9 +741,4 @@ function New-LinuxPackage $armPackage = Start-PSPackage @packageParams -Type tar-arm -SkipReleaseChecks Copy-Item $armPackage -Destination "${env:BUILD_ARTIFACTSTAGINGDIRECTORY}" -Force } - - if ($isFullBuild) - { - New-TestPackage -Destination "${env:SYSTEM_ARTIFACTSDIRECTORY}" - } }