Skip to content

Commit 8c84089

Browse files
committed
Add a GitHub workflow for testing
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
1 parent b79c2dc commit 8c84089

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

.github/workflows/ci.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Test Posh-Git
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
test:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v2
10+
- name: install dependencies
11+
shell: pwsh
12+
run: |
13+
"Git version: $(git --version)"
14+
"PSVersion: $($PSVersionTable.PSVersion)"
15+
"Host name: $($Host.Name)"
16+
17+
Set-PSRepository -Name PSGallery -InstallationPolicy Trusted
18+
Install-Module Pester -MinimumVersion 5.0.0 -MaximumVersion 5.99.99 -Scope CurrentUser -Force
19+
- name: run tests
20+
shell: pwsh
21+
run: |
22+
Import-Module Pester -PassThru
23+
$ErrorActionPreference = 'Continue'
24+
$res = Invoke-Pester -Path test -Output Detailed -PassThru -ErrorAction SilentlyContinue
25+
if (!$res -or ($res.FailedCount -gt 0)) {
26+
$Error | Format-List * -Force
27+
exit 1
28+
}

0 commit comments

Comments
 (0)