Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closes #416 - Add code coverage to Coveralls.io #461

Merged
merged 4 commits into from
Mar 16, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
os:
- "WMF 5"

environment:
CA_KEY:
secure: JQtUaB+zduPID8bzI5nfHRc2V6xYJiJp4mTHkE4W6broH8rznT1ypvn5orQ6YcGn

branches:
only:
- master
Expand All @@ -18,6 +22,11 @@ install:

build: false

before_test:
- ps: Set-PSRepository -Name PSGallery -InstallationPolicy Trusted
- ps: Install-Module Coveralls -MinimumVersion 1.0.5 -Scope CurrentUser
- ps: Import-Module Coveralls

test_script:
- ps: |
$testResultsFile = Join-Path $Env:APPVEYOR_BUILD_FOLDER TestResults.xml
Expand All @@ -38,3 +47,10 @@ test_script:
$Error | Format-List * -Force
exit 1;
}
$ErrorActionPreference = 'Stop'
if (!(Test-Path Env:CA_KEY)) {
Write-Host 'CA_KEY not set! (Expected on PR builds.)'
return;
}
$coverageResult = Format-Coverage -Include (gci ..\src\* -include *.ps1,*.psm1) -CoverallsApiToken $ENV:CA_KEY -RootFolder ../ -BranchName $ENV:APPVEYOR_REPO_BRANCH
Publish-Coverage -Coverage $coverageResult