workflows/test: factor out steps & refactoring
This commit is contained in:
parent
4785090c89
commit
3d49180b0b
6 changed files with 153 additions and 95 deletions
26
.github/actions/run-foo/action.yml
vendored
Normal file
26
.github/actions/run-foo/action.yml
vendored
Normal file
|
@ -0,0 +1,26 @@
|
|||
name: Run foo.exe
|
||||
description: Run foo.exe and verify its output
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- run: |
|
||||
$expected = @"
|
||||
Doing something #1
|
||||
Doing something #2
|
||||
Doing something #3
|
||||
"@
|
||||
|
||||
$actual = & (Join-Path . foo.exe)
|
||||
$actual = $actual -join [Environment]::NewLine
|
||||
|
||||
echo @"
|
||||
Expected output:
|
||||
$expected
|
||||
"@
|
||||
echo @"
|
||||
Actual output:
|
||||
$actual
|
||||
"@
|
||||
|
||||
$($actual -eq $expected) -or $(throw "Unexpected output!")
|
||||
shell: pwsh
|
Loading…
Add table
Add a link
Reference in a new issue