Updates to azure pipeline

This commit is contained in:
jhoneill
2018-11-30 16:05:58 +00:00
parent 2753a6876a
commit 1dc9a02d7d
2 changed files with 5 additions and 5 deletions

View File

@@ -7,18 +7,21 @@ param(
##
$PSVersionTable.PSVersion
$env:BUILD_ARTIFACTSTAGINGDIRECTORY
$VerbosePreference = "Continue"
## Create the zip before the tests run
## Otherwise the EPPlus.dll is in use after the Pester run
$ModuleVersion = (Get-Content -Raw .\ImportExcel.psd1) | Invoke-Expression | ForEach-Object ModuleVersion
if (!$DontCreateZip) {
if ($null -eq $env:BUILD_ARTIFACTSTAGINGDIRECTORY) {$env:BUILD_ARTIFACTSTAGINGDIRECTORY = '.'}
$dest = "ImportExcel-{0}-{1}.zip" -f $ModuleVersion, (Get-Date).ToString("yyyyMMddHHmmss")
Compress-Archive -Path . -DestinationPath .\$dest
Compress-Archive -Path $env:BUILD_ARTIFACTSTAGINGDIRECTORY -DestinationPath .\$dest -Verbose
}
if ($null -eq (Get-Module -ListAvailable pester)) {
Install-Module -Name Pester -Repository PSGallery -Force -Scope CurrentUser
Install-Module -Name Pester -Repository PSGallery -Force -Scope CurrentUser -Verbose
}
$result = Invoke-Pester -Script $PSScriptRoot\__tests__ -Verbose -PassThru

View File

@@ -6,9 +6,6 @@ steps:
- powershell: ./ '.\DoTests.ps1'
displayName: 'PowerShell Script'
- task: ArchiveFiles@2
displayName: 'Archive $(Build.BinariesDirectory)'
trigger:
paths:
exclude: