-
-
Notifications
You must be signed in to change notification settings - Fork 802
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add appveyor.yml file to run Pester tests
I'm not 100% confident this will work the first time. I'm an AppVeyor n00b but it shouldn't take too long to whip into shape. Also, add *.yml to .gitattributes to force LF normalization
- Loading branch information
1 parent
a1795ab
commit 1b871e8
Showing
2 changed files
with
35 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
# Disable LF normalization for all files | ||
* -text | ||
* -text | ||
*.yml text=auto |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
os: | ||
- "WMF 5" | ||
|
||
branches: | ||
only: | ||
- master | ||
|
||
install: | ||
- ps: | | ||
Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force | Out-Null | ||
Install-Module Pester -MinimumVersion 3.4.0 -Scope CurrentUser -Force | Out-Null | ||
build_script: | ||
- ps: | | ||
# Nothing to build at this point, just run Pester tests | ||
$testResultsFile = Join-Path $pwd TestResults.xml | ||
$testing = @{ | ||
Script = | ||
OutputFile = $testResultsFile | ||
OutputFormat = "NUnitXml" | ||
PassThru = $true | ||
Verbose = $VerbosePreference | ||
} | ||
Import-Module Pester | ||
Invoke-Pester @testing | ||
if (Test-Path $testResultsFile) { | ||
(New-Object 'System.Net.WebClient').UploadFile("https://ci.appveyor.com/api/testresults/nunit/$($env:APPVEYOR_JOB_ID)", $testResultsFile) | ||
} | ||
else { | ||
# Terminate the script to fail the build | ||
$Error | Format-List * -Force | ||
exit 1; | ||
} |