Files
Scoop/test/bin/init.ps1
T
Richard Kuhnt c0295f0ae0 appveyor: Run tests for PowerShell 5 and 6 (#2603)
- Adds `!linter` commit flag to skip PSScriptAnalyzer
- Adds `!manifests` commit flag to skip manifest validation
- Skips manifest validation if no JSON has changed
- Skips tests and linting if no PowerShell script has changed
- Validates only manifests that changed
- Validates all manifests if `schema.json` changed
2018-09-18 18:37:43 +02:00

21 lines
845 B
PowerShell

Write-Host "PowerShell: $($PSVersionTable.PSVersion)"
Write-Host "Install dependencies ..."
Install-Module -Repository PSGallery -Scope CurrentUser -Force -Name Pester -SkipPublisherCheck
Install-Module -Repository PSGallery -Scope CurrentUser -Name PSScriptAnalyzer,BuildHelpers
if($env:CI -eq $true) {
Write-Host "Load 'BuildHelpers' environment variables ..."
Set-BuildEnvironment -Force
}
$buildVariables = ( Get-ChildItem -Path 'Env:' ).Where( { $_.Name -match "^(?:BH|CI(?:_|$)|APPVEYOR)" } )
$buildVariables += ( Get-Variable -Name 'CI_*' -Scope 'Script' )
$details = $buildVariables |
Where-Object -FilterScript { $_.Name -notmatch 'EMAIL' } |
Sort-Object -Property 'Name' |
Format-Table -AutoSize -Property 'Name', 'Value' |
Out-String
Write-Host "CI variables:"
Write-Host $details -ForegroundColor DarkGray