-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
29 changed files
with
498 additions
and
344 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
This file was deleted.
Oops, something went wrong.
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,66 @@ | ||
on: | ||
push: | ||
branches: [ develop, bugfix/*, feature/* ] | ||
pull_request: | ||
branches: [ develop ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout source | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install build dependencies | ||
shell: pwsh | ||
run: | | ||
Set-PSRepository PSGallery -InstallationPolicy Trusted | ||
Install-Module InvokeBuild -ErrorAction Stop | ||
Install-Module PlatyPS -ErrorAction Stop | ||
- name: Update docs | ||
shell: pwsh | ||
run: Invoke-Build UpdateDocs | ||
|
||
- name: Create build | ||
shell: pwsh | ||
run: Invoke-Build Build | ||
|
||
- name: Upload build | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
path: build/PSDocker | ||
name: build | ||
|
||
test: | ||
strategy: | ||
matrix: | ||
os: [windows-latest, ubuntu-latest] | ||
fail-fast: false | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Checkout source | ||
uses: actions/checkout@v2 | ||
|
||
- name: Run tests | ||
shell: pwsh | ||
run: | | ||
$config = New-PesterConfiguration @{ | ||
'Run.Path' = 'test' | ||
'Run.Exit' = $true | ||
'TestResult.Enabled' = $true | ||
'CodeCoverage.Enabled' = $true | ||
} | ||
Invoke-Pester -Configuration $config | ||
- name: Upload test results | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: ${{ matrix.os }}-test-results | ||
path: testResults.xml | ||
|
||
- name: Upload test coverage | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: ${{ matrix.os }}-test-coverage | ||
path: coverage.xml |
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 |
---|---|---|
@@ -1,47 +1,15 @@ | ||
function Get-BuildRoot { | ||
if ( $env:APPVEYOR ) { | ||
Write-Output $env:APPVEYOR_BUILD_FOLDER | ||
} else { | ||
Write-Output '.' | ||
} | ||
} | ||
<# | ||
.Synopsis | ||
Build script <https://github.com/nightroman/Invoke-Build> | ||
[string] $root = Get-BuildRoot | ||
[string] $sourcePath = "$root\src" | ||
[string] $buildPath = "$root\build" | ||
[string] $docPath = "$root\docs" | ||
[string] $manifestFilePath = "$sourcePath\PSDocker.psd1" | ||
[string] $moduleBuildPath = "$buildPath\PSDocker" | ||
.Example | ||
Invoke-Build Publish -NuGetApiKey xyz | ||
#> | ||
|
||
task Build PrepareBuildPath, CopyArtefacts | ||
param( | ||
[string] $NuGetApiKey = $env:nuget_apikey | ||
) | ||
|
||
task PrepareBuildPath { | ||
New-Item -Path $buildPath -ItemType Directory | Out-Null | ||
} | ||
. $PsScriptRoot\tasks\Build.Tasks.ps1 | ||
|
||
task CleanBuildPath { | ||
Remove-Item $buildPath -Recurse -ErrorAction 'Continue' | ||
} | ||
|
||
task CopyArtefacts { | ||
Copy-Item -Path $sourcePath -Destination $moduleBuildPath -Recurse | ||
} | ||
|
||
task Test { | ||
Invoke-Pester $sourcePath | ||
} | ||
|
||
task Publish { | ||
Publish-Module -Path $moduleBuildPath -NuGetApiKey $env:nuget_apikey | ||
} | ||
|
||
task Clean CleanBuildPath | ||
|
||
task UpdateDocs { | ||
Import-Module $manifestFilePath -Force | ||
Remove-Item -Path $docPath/* | ||
New-MarkdownHelp -Module PSDocker -OutputFolder $docPath | ||
# Update-MarkdownHelp -Path $docPath -AlphabeticParamsOrder -Force | ||
} | ||
|
||
task . Clean, Build | ||
task . Clean, Build |
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
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.