mirror of
https://github.com/dfinke/ImportExcel.git
synced 2025-12-06 00:23:20 +00:00
28 lines
771 B
PowerShell
28 lines
771 B
PowerShell
param(
|
|
[Switch]$DontCreateZip
|
|
)
|
|
|
|
##
|
|
# Used in Appveyor.yml
|
|
##
|
|
|
|
$PSVersionTable.PSVersion
|
|
|
|
## 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) {
|
|
$dest = "ImportExcel-{0}-{1}.zip" -f $ModuleVersion, (Get-Date).ToString("yyyyMMddHHmmss")
|
|
Compress-Archive -Path . -DestinationPath .\$dest
|
|
}
|
|
|
|
if ($null -eq (Get-Module -ListAvailable pester)) {
|
|
Install-Module -Name Pester -Repository PSGallery -Force -Scope CurrentUser
|
|
}
|
|
|
|
$result = Invoke-Pester -Script $PSScriptRoot\__tests__ -Verbose -PassThru
|
|
|
|
if ($result.FailedCount -gt 0) {
|
|
throw "$($result.FailedCount) tests failed."
|
|
} |