@@ -19,39 +19,55 @@ jobs:
1919 - name : Check out repository
2020 uses : actions/checkout@v4
2121
22+ # Install uv
2223 - name : Install uv
2324 run : curl -LsSf https://astral.sh/uv/install.sh | sh
24- if : runner.os == 'Linux' || runner.os == 'macOS'
25-
25+ if : runner.os != 'Windows'
2626 - name : Install uv (Windows)
2727 run : powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
2828 if : runner.os == 'Windows'
29-
3029 - name : Add uv to PATH
3130 run : echo "$HOME/.cargo/bin" >> $GITHUB_PATH
32- if : runner.os == 'Linux' || runner.os == 'macOS'
33-
31+ if : runner.os != 'Windows'
3432 - name : Add uv to PATH (Windows)
3533 run : echo "$((Get-Item (Get-Command uv).Source).Directory.FullName)" | Out-File -FilePath $env:GITHUB_PATH -Append
3634 if : runner.os == 'Windows'
3735
38- - name : Set up Python with uv
39- run : uv venv -p ${{ matrix.python-version }}
40-
41- - name : Install dependencies
42- run : uv pip install -e ".[dev]"
36+ # Settings Python and install ALL dependencies
37+ - name : Set up Python and install dependencies
38+ run : |
39+ uv venv -p ${{ matrix.python-version }}
40+ uv pip install -e ".[dev]"
4341
44- - name : Lint and Format with ruff
45- run : uv run python -m ruff check src/ tests/ && uv run python -m ruff format src/ tests/
46- if : runner.os != 'Windows'
42+ # Step for Unix
43+ - name : Activate venv and run checks
44+ shell : bash
45+ if : runner.os =! 'Windows'
46+ run : |
47+ source .venv/bin/activate
48+
49+ echo "--- Running Lint and Format Check ---"
50+ uv run python -m ruff check src/ tests/
51+ uv run python -m ruff format --check src/ tests/
52+ echo "--- Running Tests with Coverage ---"
53+
54+ uv run python -m coverage run -m unittest discover tests
4755
48- - name : Lint and Format with ruff (Windows)
49- run : uv run python -m ruff check src/ tests/ ; uv run python -m ruff format src/ tests/
56+ # Step for Windows
57+ - name : Activate venv and run checks (Windows)
58+ shell : pwsh
5059 if : runner.os == 'Windows'
60+ run : |
61+ .venv\Scripts\Activate.ps1
62+
63+ echo "--- Running Lint and Format Check ---"
64+ ruff check src/ tests/
65+ ruff format --check src/ tests/
66+
67+ echo "--- Running Tests with Coverage ---"
68+ coverage run -m unittest discover tests
5169
52- - name : Run tests with coverage
53- run : uv run python -m coverage run -m unittest discover tests
54-
70+ # Load report
5571 - name : Upload coverage reports to Codecov
5672 uses : codecov/codecov-action@v5
5773 with :
0 commit comments