-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.bat
More file actions
36 lines (29 loc) · 889 Bytes
/
test.bat
File metadata and controls
36 lines (29 loc) · 889 Bytes
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
@echo off
setlocal enabledelayedexpansion
set PYTHON_BIN=python
set VENV_DIR=.venv-ci
set REQ_FILE=requirements-ci.txt
echo Setting up CI virtual environment
REM Step 1: Create venv if not exists
if not exist "%VENV_DIR%" (
echo Creating virtual environment: %VENV_DIR%
%PYTHON_BIN% -m venv "%VENV_DIR%"
)
call "%VENV_DIR%\Scripts\activate.bat"
REM Step 2: Upgrade pip & install dependencies
echo Installing dependencies from %REQ_FILE%
python -m pip install --upgrade pip wheel setuptools
python -m pip install --extra-index-url https://download.pytorch.org/whl/cpu -r "%REQ_FILE%"
if errorlevel 1 (
echo Dependency installation failed.
exit /b 1
)
REM Step 3: Run tests
echo Running tests...
python -m pytest --disable-warnings --cov=engine --cov-report=term
if errorlevel 1 (
echo Tests failed.
exit /b 1
)
echo All tests completed successfully!
endlocal