mirror of
https://github.com/dfinke/ImportExcel.git
synced 2026-01-01 08:03:27 +00:00
Updates to azure pipeline
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -6,9 +6,6 @@ steps:
|
||||
- powershell: ./ '.\DoTests.ps1'
|
||||
displayName: 'PowerShell Script'
|
||||
|
||||
- task: ArchiveFiles@2
|
||||
displayName: 'Archive $(Build.BinariesDirectory)'
|
||||
|
||||
trigger:
|
||||
paths:
|
||||
exclude:
|
||||
|
||||
Reference in New Issue
Block a user