Update python-app.yml #610
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: | | |
$cleanedPath = ($env:PATH -split ';' | Where-Object { Test-Path $_ }) -join ';' | |
echo $cleanedPath | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 | |
echo "Cleaned PATH: $cleanedPath" | |
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 |