-
-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathappveyor.yml
37 lines (34 loc) · 1.45 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
35
36
37
skip_commits:
files:
- "**/*.md"
- "**/*.png"
- "**/*LICENCE"
- "CI/WindowOSBuild.Tests.ps1"
- "**/WindowsOSBuild.psd1"
install:
- ps: |
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Install-Module Pester -Force
- pwsh: |
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Install-Module Pester -Force
build: off
test_script:
- ps: |
Import-Module -Name "Pester" -Force
Import-Module -Name "C:\projects\windowsosbuild"
$testResultsFile = ".\TestsResults_PS.xml"
$ResultsPS = Invoke-Pester -OutputFormat NUnitXml -OutputFile $testResultsFile -Show All -PassThru
(New-Object 'System.Net.WebClient').UploadFile("https://ci.appveyor.com/api/testresults/nunit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path $testResultsFile))
If ($ResultsPS.FailedCount -gt 0) {
throw "$($res.FailedCount) tests failed."
}
- pwsh: |
Import-Module -Name "Pester" -Force
Import-Module -Name "C:\projects\windowsosbuild"
$testResultsFile = ".\TestsResults_PWSH.xml"
$ResultsPWSH = Invoke-Pester -OutputFormat NUnitXml -OutputFile $testResultsFile -Show All -PassThru
(New-Object 'System.Net.WebClient').UploadFile("https://ci.appveyor.com/api/testresults/nunit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path $testResultsFile))
If ($ResultsPWSH.FailedCount -gt 0) {
throw "$($res.FailedCount) tests failed."
}