-
-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #57 from Badgerati/develop
v0.14.0
- Loading branch information
Showing
40 changed files
with
2,655 additions
and
349 deletions.
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 |
---|---|---|
|
@@ -15,7 +15,6 @@ | |
[Rr]eleases/ | ||
x64/ | ||
x86/ | ||
build/ | ||
bld/ | ||
[Bb]in/ | ||
[Oo]bj/ | ||
|
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,4 +1,4 @@ | ||
FROM microsoft/powershell:latest | ||
FROM microsoft/powershell:6.0.2-ubuntu-xenial | ||
LABEL maintainer="Matthew Kelly (Badgerati)" | ||
RUN mkdir -p /usr/local/share/powershell/Modules/Pode | ||
COPY ./src/ /usr/local/share/powershell/Modules/Pode | ||
COPY ./src/ /usr/local/share/powershell/Modules/Pode |
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
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,20 @@ | ||
version: 0.14.{build} | ||
image: Visual Studio 2017 | ||
|
||
branches: | ||
except: | ||
- gh-pages | ||
|
||
skip_tags: true | ||
|
||
configuration: Release | ||
|
||
install: | ||
- cinst -y pester --version 4.1.0 | ||
- cinst -y psake --version 4.7.0 | ||
- ps: Import-Module "$($pwd)\build\appveyor.psm1" | ||
|
||
build: off | ||
|
||
test_script: | ||
- ps: Invoke-AppVeyorTest |
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,42 @@ | ||
function Invoke-AppVeyorTest | ||
{ | ||
# run the tests | ||
$file = "$($pwd)\TestsResults.xml" | ||
$status = Invoke-Pester "$($pwd)\tests\unit" -OutputFormat NUnitXml -OutputFile $file -PassThru | ||
|
||
# upload the results | ||
Update-AppVeyorTestResults -ResultFile $file | ||
|
||
# fail build if any tests failed | ||
Test-AppVeyorTestResults -ResultStatus $status -ResultFile $file | ||
} | ||
|
||
function Update-AppVeyorTestResults | ||
{ | ||
param ( | ||
$ResultFile | ||
) | ||
|
||
Write-Host "Uploading results for Job ID '$($env:APPVEYOR_JOB_ID)'" -ForegroundColor Cyan | ||
(New-Object 'System.Net.WebClient').UploadFile("https://ci.appveyor.com/api/testresults/nunit/$($env:APPVEYOR_JOB_ID)", $ResultFile) | ||
Write-Host 'Results uploaded' -ForegroundColor Green | ||
} | ||
|
||
function Test-AppVeyorTestResults | ||
{ | ||
param ( | ||
$ResultStatus, | ||
$ResultFile | ||
) | ||
|
||
Write-Host 'Checking if any of the tests have failed' | ||
|
||
if ($ResultStatus.FailedCount -gt 0) { | ||
Write-Host 'Some of the tests have failed' -ForegroundColor Red | ||
Push-AppveyorArtifact $ResultFile | ||
throw "$($ResultStatus.FailedCount) tests failed." | ||
} | ||
else { | ||
Write-Host 'No tests failed!' -ForegroundColor Green | ||
} | ||
} |
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,23 @@ | ||
if ((Get-Module -Name Pode | Measure-Object).Count -ne 0) | ||
{ | ||
Remove-Module -Name Pode | ||
} | ||
|
||
$path = Split-Path -Parent -Path (Split-Path -Parent -Path $MyInvocation.MyCommand.Path) | ||
Import-Module "$($path)/src/Pode.psm1" -ErrorAction Stop | ||
|
||
# or just: | ||
# Import-Module Pode | ||
|
||
# create a server listening on port 8085, set to monitor file changes and restart the server | ||
Server -Port 8085 { | ||
|
||
engine pode | ||
|
||
# GET request for web page on "localhost:8085/" | ||
route 'get' '/' { | ||
param($session) | ||
view 'simple' -Data @{ 'numbers' = @(1, 2, 3); } | ||
} | ||
|
||
} -FileMonitor |
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
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 |
---|---|---|
|
@@ -49,4 +49,4 @@ Server -Port 8085 { | |
} | ||
} | ||
|
||
} | ||
} -FileMonitor |
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
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
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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
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
Oops, something went wrong.