Harden Windows Actions shell execution
This commit is contained in:
parent
151969e377
commit
e40242cc39
|
|
@ -33,6 +33,9 @@ jobs:
|
||||||
analyze:
|
analyze:
|
||||||
runs-on: [self-hosted, Windows]
|
runs-on: [self-hosted, Windows]
|
||||||
timeout-minutes: 240
|
timeout-minutes: 240
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: powershell -NoProfile -NonInteractive -ExecutionPolicy Bypass -File {0}
|
||||||
env:
|
env:
|
||||||
PYTHONUTF8: "1"
|
PYTHONUTF8: "1"
|
||||||
PIP_DISABLE_PIP_VERSION_CHECK: "1"
|
PIP_DISABLE_PIP_VERSION_CHECK: "1"
|
||||||
|
|
@ -51,13 +54,13 @@ jobs:
|
||||||
python-version: "3.13"
|
python-version: "3.13"
|
||||||
|
|
||||||
- name: Install TradingAgents
|
- name: Install TradingAgents
|
||||||
shell: powershell
|
|
||||||
run: |
|
run: |
|
||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
|
if ($LASTEXITCODE) { exit $LASTEXITCODE }
|
||||||
python -m pip install -e .
|
python -m pip install -e .
|
||||||
|
if ($LASTEXITCODE) { exit $LASTEXITCODE }
|
||||||
|
|
||||||
- name: Verify Codex login and model availability
|
- name: Verify Codex login and model availability
|
||||||
shell: powershell
|
|
||||||
run: |
|
run: |
|
||||||
$workspaceDir = Join-Path $env:GITHUB_WORKSPACE ".codex-preflight"
|
$workspaceDir = Join-Path $env:GITHUB_WORKSPACE ".codex-preflight"
|
||||||
$script = @(
|
$script = @(
|
||||||
|
|
@ -73,9 +76,9 @@ jobs:
|
||||||
"print('First available models:', ', '.join(result.models[:8]))"
|
"print('First available models:', ', '.join(result.models[:8]))"
|
||||||
) -join "`n"
|
) -join "`n"
|
||||||
$script | python -
|
$script | python -
|
||||||
|
if ($LASTEXITCODE) { exit $LASTEXITCODE }
|
||||||
|
|
||||||
- name: Run scheduled analysis and build site
|
- name: Run scheduled analysis and build site
|
||||||
shell: powershell
|
|
||||||
run: |
|
run: |
|
||||||
$configPath = "config/scheduled_analysis.toml"
|
$configPath = "config/scheduled_analysis.toml"
|
||||||
if (-not (Test-Path $configPath)) {
|
if (-not (Test-Path $configPath)) {
|
||||||
|
|
@ -106,9 +109,9 @@ jobs:
|
||||||
}
|
}
|
||||||
|
|
||||||
python @args
|
python @args
|
||||||
|
if ($LASTEXITCODE) { exit $LASTEXITCODE }
|
||||||
|
|
||||||
- name: Add Git Bash to PATH for Pages packaging
|
- name: Add Git Bash to PATH for Pages packaging
|
||||||
shell: powershell
|
|
||||||
run: |
|
run: |
|
||||||
$gitBinCandidates = @(
|
$gitBinCandidates = @(
|
||||||
"C:\Program Files\Git\bin",
|
"C:\Program Files\Git\bin",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue