@@ -19,39 +19,55 @@ jobs:
19
19
- name : Check out repository
20
20
uses : actions/checkout@v4
21
21
22
+ # Install uv
22
23
- name : Install uv
23
24
run : curl -LsSf https://astral.sh/uv/install.sh | sh
24
- if : runner.os == 'Linux' || runner.os == 'macOS'
25
-
25
+ if : runner.os != 'Windows'
26
26
- name : Install uv (Windows)
27
27
run : powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
28
28
if : runner.os == 'Windows'
29
-
30
29
- name : Add uv to PATH
31
30
run : echo "$HOME/.cargo/bin" >> $GITHUB_PATH
32
- if : runner.os == 'Linux' || runner.os == 'macOS'
33
-
31
+ if : runner.os != 'Windows'
34
32
- name : Add uv to PATH (Windows)
35
33
run : echo "$((Get-Item (Get-Command uv).Source).Directory.FullName)" | Out-File -FilePath $env:GITHUB_PATH -Append
36
34
if : runner.os == 'Windows'
37
35
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]"
43
41
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
47
55
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
50
59
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
51
69
52
- - name : Run tests with coverage
53
- run : uv run python -m coverage run -m unittest discover tests
54
-
70
+ # Load report
55
71
- name : Upload coverage reports to Codecov
56
72
uses : codecov/codecov-action@v5
57
73
with :
0 commit comments