Skip to content

Commit

Permalink
Add a GitHub workflow for testing
Browse files Browse the repository at this point in the history
Signed-off-by: Johannes Schindelin <[email protected]>
  • Loading branch information
dscho committed Dec 10, 2021
1 parent b79c2dc commit 8c84089
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Test Posh-Git

on: [push, pull_request]

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: install dependencies
shell: pwsh
run: |
"Git version: $(git --version)"
"PSVersion: $($PSVersionTable.PSVersion)"
"Host name: $($Host.Name)"
Set-PSRepository -Name PSGallery -InstallationPolicy Trusted
Install-Module Pester -MinimumVersion 5.0.0 -MaximumVersion 5.99.99 -Scope CurrentUser -Force
- name: run tests
shell: pwsh
run: |
Import-Module Pester -PassThru
$ErrorActionPreference = 'Continue'
$res = Invoke-Pester -Path test -Output Detailed -PassThru -ErrorAction SilentlyContinue
if (!$res -or ($res.FailedCount -gt 0)) {
$Error | Format-List * -Force
exit 1
}

0 comments on commit 8c84089

Please sign in to comment.