Run the native Windows job's steps past the default execution policy
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -30,9 +30,14 @@ jobs:
|
||||
timeout-minutes: 30
|
||||
env:
|
||||
RUN_ID: ${{ github.event.workflow_run.id || inputs.run_id }}
|
||||
# Windows' default execution policy (Restricted) refuses the script files
|
||||
# the runner writes for each step; bypass it for these steps only, so the
|
||||
# runner works without changing the machine's policy.
|
||||
defaults:
|
||||
run:
|
||||
shell: powershell -NoProfile -NonInteractive -ExecutionPolicy Bypass -File {0}
|
||||
steps:
|
||||
- name: Fetch the cross-built Windows build
|
||||
shell: powershell
|
||||
env:
|
||||
TOKEN: ${{ github.token }}
|
||||
API: ${{ github.api_url }}/repos/${{ github.repository }}
|
||||
@@ -59,7 +64,6 @@ jobs:
|
||||
"Testing run $env:RUN_ID on Windows $($os.DisplayVersion) build $($os.CurrentBuild)"
|
||||
|
||||
- name: Unit tests (native Windows)
|
||||
shell: powershell
|
||||
run: |
|
||||
$failed = @()
|
||||
foreach ($test in Get-Content "$env:ALKANE_NATIVE\tests\tests.txt") {
|
||||
@@ -70,7 +74,6 @@ jobs:
|
||||
if ($failed) { Write-Host "FAILED: $($failed -join ', ')"; exit 1 }
|
||||
|
||||
- name: Headless UI self-test (native Windows)
|
||||
shell: powershell
|
||||
run: |
|
||||
# A GUI-subsystem executable: wait for it and read its redirected output.
|
||||
$env:ALKANE_SELFTEST = '1'
|
||||
@@ -82,6 +85,5 @@ jobs:
|
||||
|
||||
- name: Remove the downloaded build
|
||||
if: always()
|
||||
shell: powershell
|
||||
run: |
|
||||
if ($env:ALKANE_NATIVE) { Remove-Item -Recurse -Force $env:ALKANE_NATIVE -ErrorAction SilentlyContinue }
|
||||
|
||||
Reference in New Issue
Block a user