-
Notifications
You must be signed in to change notification settings - Fork 2
44 lines (38 loc) · 1.11 KB
/
windows-workflow.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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