Update windows-workflow.yml #5
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: Windows Workflow | |
on: | |
push: | |
branches: | |
- main # Change this to your default branch if necessary | |
pull_request: | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Python environment | |
shell: cmd | |
# %LOCALAPPDATA%\Microsoft\WindowsApps\python3.exe | |
run: | | |
echo Setting up the virtual environment... | |
python3.exe -m venv venv | |
if errorlevel 1 ( | |
echo Failed to create virtual environment. | |
exit /b 1 | |
) | |
- name: Install dependencies | |
shell: cmd | |
run: | | |
echo Installing dependencies... | |
venv\Scripts\python.exe -m pip install --upgrade pip >nul 2>&1 | |
venv\Scripts\python.exe -m pip install -v -r requirements-windows.txt | |
if errorlevel 1 ( | |
echo Failed to install dependencies. | |
exit /b 1 | |
) | |
- name: Upload venv as artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: venv | |
path: venv | |
retention-days: 1 |