@@ -50,27 +50,36 @@ jobs:
5050 restore-keys : |
5151 ${{ runner.os }}-pip-
5252
53- - name : Install Python tools into a virtualenv
53+ - name : Create venv and install Python tools (Unix)
54+ if : runner.os != 'Windows'
5455 run : |
55- # create and activate a portable virtualenv and install tooling there
56+ # create a portable virtualenv and install tooling there (Linux / macOS)
5657 python -m venv .venv
5758 ./.venv/bin/python -m pip install --upgrade pip
5859 ./.venv/bin/python -m pip install maturin pytest pytest-asyncio pytest-cov black isort ruff
5960
61+ - name : Create venv and install Python tools (Windows)
62+ if : runner.os == 'Windows'
63+ run : |
64+ # create a portable virtualenv and install tooling there (Windows)
65+ python -m venv .venv
66+ .\\.venv\\Scripts\\python -m pip install --upgrade pip
67+ .\\.venv\\Scripts\\python -m pip install maturin pytest pytest-asyncio pytest-cov black isort ruff
68+
6069 - name : Check Python code formatting with black
6170 if : matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12'
6271 run : |
63- black --check --diff python/
72+ ./.venv/bin/python -m black --check --diff python/
6473
6574 - name : Check Python imports ordering with isort
6675 if : matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12'
6776 run : |
68- isort --check-only --diff python/
77+ ./.venv/bin/python -m isort --check-only --diff python/
6978
7079 - name : Lint Python code with ruff
7180 if : matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12'
7281 run : |
73- ruff check python/
82+ ./.venv/bin/python -m ruff check python/
7483
7584 - name : Check Rust code formatting
7685 if : matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12'
0 commit comments