@@ -2,52 +2,57 @@ name: Tests
22
33on :
44 push :
5- branches : [ main ]
65 pull_request :
76 branches : [ main ]
87 workflow_dispatch :
98
9+ env :
10+ UV_SYSTEM_PYTHON : 1
11+
1012jobs :
1113 build :
1214 runs-on : ubuntu-latest
1315 strategy :
1416 fail-fast : false
1517 matrix :
16- python-version : [ "3.8", "3.9", "3.10", "3.11", "3.12" ]
18+ python-version : [ "3.8", "3.9", "3.10", "3.11", "3.12", "3.13" ]
1719 steps :
1820 - uses : actions/checkout@v4
19- - name : Set up Python ${{ matrix.python-version }}
21+ - name : Set up Python
2022 uses : actions/setup-python@v5
2123 with :
2224 python-version : ${{ matrix.python-version }}
25+ - name : Set up uv
26+ uses : astral-sh/setup-uv@v5
27+ with :
28+ cache-dependency-glob : |
29+ **/pyproject.toml
2330 - name : Install dependencies
24- run : |
25- curl -LsSf https://astral.sh/uv/install.sh | sh
26- uv pip install --system -e '.[dev,docs,learning]'
31+ run : uv sync --all-extras
2732 # NumPy 2.0 is not available for Python 3.8 and older versions, which leads to broken tests
2833 - name : Lint with Mypy (Python 3.8)
29- run : mypy crowdkit
34+ run : uv run mypy crowdkit
3035 if : matrix.python-version == '3.8'
3136 - name : Lint with Mypy
32- run : mypy crowdkit tests
37+ run : uv run mypy crowdkit tests
3338 if : matrix.python-version != '3.8'
3439 # pyupgrade is incompatible with Python 3.8 and older versions
3540 - name : Pre-Commit Check
3641 uses : pre-commit/action@v3.0.1
3742 if : matrix.python-version != '3.8'
3843 - name : Test with pytest
39- run : coverage run --source crowdkit -m pytest
44+ run : uv run coverage run --source crowdkit -m pytest
4045 - name : Codecov
4146 env :
4247 CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
43- run : codecov
44- if : matrix.python-version == '3.12 '
48+ run : uv run codecov
49+ if : matrix.python-version == '3.13 '
4550 - name : Run MkDocs
46- run : mkdocs build --strict
51+ run : uv run mkdocs build --strict
4752 - name : Build wheel
4853 run : |
49- python3 -m build --sdist --wheel .
50- twine check --strict dist/*
54+ uv run python3 -m build --sdist --wheel .
55+ uv run twine check --strict dist/*
5156 - name : Validate CITATION.cff
5257 uses : citation-file-format/cffconvert-github-action@2.0.0
5358 with :
0 commit comments