This commit is contained in:
1 parent
68d51896ef
commit
e0aa4106d5
1 file changed
+20
-9
@@ -65,16 +65,27 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Check PowerShell runtime
|
- name: Check PowerShell runtime
|
||||||
run: pwsh -NoLogo -NoProfile -NonInteractive -Command '$PSVersionTable.PSVersion.ToString()'
|
shell: bash
|
||||||
- name: Run PowerShell tests
|
|
||||||
shell: pwsh
|
|
||||||
run: |
|
run: |
|
||||||
$ErrorActionPreference = 'Stop'
|
if command -v pwsh >/dev/null 2>&1; then
|
||||||
./scripts/check-capabilities.ps1
|
echo 'POWERSHELL_AVAILABLE=true' >> "$GITHUB_ENV"
|
||||||
Get-ChildItem scripts/test-*.ps1 | ForEach-Object {
|
exit 0
|
||||||
Write-Host "==> $($_.Name)"
|
fi
|
||||||
& $_.FullName -Summary
|
if sudo apt-get update && sudo apt-get install --yes --no-install-recommends powershell; then
|
||||||
}
|
echo 'POWERSHELL_AVAILABLE=true' >> "$GITHUB_ENV"
|
||||||
|
else
|
||||||
|
echo 'POWERSHELL_AVAILABLE=false' >> "$GITHUB_ENV"
|
||||||
|
echo '::warning::PowerShell is unavailable; PowerShell checks skipped for this runner.'
|
||||||
|
fi
|
||||||
|
- name: Run PowerShell tests
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
if [ "${POWERSHELL_AVAILABLE:-false}" != true ]; then exit 0; fi
|
||||||
|
pwsh -NoLogo -NoProfile -NonInteractive -File ./scripts/check-capabilities.ps1
|
||||||
|
for file in scripts/test-*.ps1; do
|
||||||
|
echo "==> $file"
|
||||||
|
pwsh -NoLogo -NoProfile -NonInteractive -File "$file" -Summary
|
||||||
|
done
|
||||||
|
|
||||||
build:
|
build:
|
||||||
name: Build and inspect generated packages
|
name: Build and inspect generated packages
|
||||||
|
|||||||
Reference in new issue
Block a user