-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathappveyor.yml
34 lines (30 loc) · 1.79 KB
/
appveyor.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
build: false
test_script:
- ps: |
Install-Module Lability -Force -AllowClobber
Install-Module ComputerManagementDsc -Force -AllowClobber
Install-Module NetworkingDsc -Force -AllowClobber
Install-Module ActiveDirectoryDsc -Force -AllowClobber
Install-Module DnsServerDsc -Force -AllowClobber
Install-Module FileSystemDsc -Force -AllowClobber
Install-Module xWindowsUpdate -Force -AllowClobber
Install-Module SqlServerDsc -Force -AllowClobber
Install-Module FailoverClusterDsc -Force -AllowClobber
Install-Module xPSDesiredStateConfiguration -Force -AllowClobber
Install-Module Pester -Force -AllowClobber
Install-Module PSScriptAnalyzer -Force -AllowClobber
$env:PSModulePath = "$((Get-Item .).FullName)\;$($env:PSModulePath)"
$res = Invoke-Pester -Path "." -OutputFormat NUnitXml -OutputFile TestsResults.xml -PassThru
(New-Object 'System.Net.WebClient').UploadFile("https://ci.appveyor.com/api/testresults/nunit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .\TestsResults.xml))
if ($res.FailedCount -gt 0) { throw "$($res.FailedCount) tests failed."}
# Disabled, only seems to crash AppVeyor
# - pwsh: |
# Install-Module Disposable -Force -AllowClobber
# Install-Module Error -Force -AllowClobber
# Install-Module Pester -Force -AllowClobber
# Install-Module PoshRSJob -Force -AllowClobber
#
# $env:PSModulePath = "$((Get-Item .).FullName)\;$($env:PSModulePath)"
# $res = Invoke-Pester -Path "." -OutputFormat NUnitXml -OutputFile TestsResults.xml -PassThru
# (New-Object 'System.Net.WebClient').UploadFile("https://ci.appveyor.com/api/testresults/nunit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .\TestsResults.xml))
# if ($res.FailedCount -gt 0) { throw "$($res.FailedCount) tests failed."}