-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathcheck.bat
More file actions
38 lines (32 loc) · 1.07 KB
/
Copy pathcheck.bat
File metadata and controls
38 lines (32 loc) · 1.07 KB
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
@echo off
setlocal
set PYTHON=python
set PYTHON_310="C:\Program Files\Python310\python.exe"
set PYTHON_311="C:\Program Files\Python311\python.exe"
set PYTHON_312="C:\Program Files\Python312\python.exe"
set PYTHON_313="C:\Program Files\Python313\python.exe"
set PYTHON_314="C:\Program Files\Python314\python.exe"
rem Run static type checker and verify formatting guidelines
%PYTHON% -m ruff check
if errorlevel 1 goto error
%PYTHON% -m ruff format --check
if errorlevel 1 goto error
%PYTHON% -m mypy pyopenapi
if errorlevel 1 goto error
%PYTHON% -m mypy tests
if errorlevel 1 goto error
rem Run unit tests
if exist %PYTHON_310% %PYTHON_310% -m unittest discover tests
if errorlevel 1 goto error
if exist %PYTHON_311% %PYTHON_311% -m unittest discover tests
if errorlevel 1 goto error
if exist %PYTHON_312% %PYTHON_312% -m unittest discover tests
if errorlevel 1 goto error
if exist %PYTHON_313% %PYTHON_313% -m unittest discover tests
if errorlevel 1 goto error
if exist %PYTHON_314% %PYTHON_314% -m unittest discover tests
if errorlevel 1 goto error
goto EOF
:error
exit /b %errorlevel%
:EOF