-
-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy pathappveyor.yml
More file actions
60 lines (52 loc) · 2.3 KB
/
Copy pathappveyor.yml
File metadata and controls
60 lines (52 loc) · 2.3 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
artifacts:
- path: TestArtifacts\*.json
name: TestArtifacts
skip_commits:
files:
- "**/*.md"
- "**/*.png"
- "**/*LICENCE"
- "CI/WindowsOSBuild.Tests.ps1"
- "**/WindowsOSBuild.psd1"
cache:
- '%USERPROFILE%\AppData\Local\WindowsOSBuild\Cache -> public\*.ps1, public\*.psm1'
install:
- ps: |
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Install-Module Pester -RequiredVersion 5.7.1 -Force
- pwsh: |
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Install-Module Pester -RequiredVersion 5.7.1 -Force
build: off
before_test:
- ps: |
$CachePath = "$env:LOCALAPPDATA\WindowsOSBuild\Cache"
Write-Host "Cache path: $CachePath"
Write-Host "Cache exists: $(Test-Path $CachePath)"
if (Test-Path $CachePath) {
Get-ChildItem $CachePath -Recurse | Select-Object FullName, Length, LastWriteTime | Format-Table -AutoSize
}
- pwsh: |
$CachePath = "$env:LOCALAPPDATA\WindowsOSBuild\Cache"
Write-Host "Cache path: $CachePath"
Write-Host "Cache exists: $(Test-Path $CachePath)"
if (Test-Path $CachePath) {
Get-ChildItem $CachePath -Recurse | Select-Object FullName, Length, LastWriteTime | Format-Table -AutoSize
}
test_script:
- ps: |
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 "$($ResultsPS.FailedCount) tests failed."
}
- pwsh: |
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 "$($ResultsPWSH.FailedCount) tests failed."
}