Skip to content

Commit

Permalink
Add appveyor.yml file to run Pester tests
Browse files Browse the repository at this point in the history
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
rkeithhill authored and dahlbyk committed Jan 9, 2017
1 parent a1795ab commit 1b871e8
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .gitattributes
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
33 changes: 33 additions & 0 deletions appveyor.yml
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;
}

0 comments on commit 1b871e8

Please sign in to comment.