Skip to content

Update python-app.yml #608

Update python-app.yml

Update python-app.yml #608

Workflow file for this run

name: Test Invalid Path
on: [push]
jobs:
test-invalid-path:
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Add Invalid Path
run: |
echo "D:\InvalidPath" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
echo "Updated PATH: $env:PATH"
shell: pwsh
- name: Verify Invalid Path Added
run: echo $env:PATH
shell: pwsh
- name: Clean PATH
run: |
$env:PATH = ($env:PATH -split ';' | Where-Object { Test-Path $_ }) -join ';'
echo "Cleaned PATH: $env:PATH"
echo $env:PATH | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
shell: pwsh
- name: Verify Invalid Path Removed
run: echo $env:PATH
shell: pwsh
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Verify Python Installation
run: python --version