@@ -11,52 +11,53 @@ jobs:
1111 lint :
1212 strategy :
1313 matrix :
14- cmd :
15- - black
16- - ruff
17- - mypy
14+ cmd : [ "black", "ruff", "mypy" ]
1815 runs-on : ubuntu-latest
1916 steps :
20- - uses : actions/checkout@v4
21- - name : Install poetry
22- run : pipx install poetry
23- - name : Set up Python
24- uses : actions /setup-python@v4
17+ - uses : actions/checkout@v5
18+ with :
19+ persist-credentials : false
20+ - id : setup-uv
21+ uses : astral-sh /setup-uv@v7
2522 with :
26- python-version : " 3.11"
27- cache : " poetry"
23+ enable-cache : true
24+ cache-suffix : " 3.12"
25+ version : " latest"
26+ python-version : " 3.12"
2827 - name : Install deps
29- run : poetry install
28+ run : uv sync --all-extras
3029 - name : Run lint check
31- run : poetry run pre-commit run -a ${{ matrix.cmd }}
30+ run : uv run pre-commit run -a ${{ matrix.cmd }}
3231 pytest :
3332 strategy :
3433 matrix :
35- py_version : ["3.9", "3.10", "3.11", "3.12", "3.13"]
34+ py_version : [ "3.10", "3.11", "3.12", "3.13" ]
3635 runs-on : " ubuntu-latest"
3736 steps :
38- - uses : actions/checkout@v4
37+ - uses : actions/checkout@v5
3938 - name : Set up Redis instance and Redis cluster
4039 run : docker compose up -d
4140 - name : Set up Python
42- uses : actions/setup-python@v2
41+ uses : actions/setup-python@v6
42+ with :
43+ python-version : " ${{ matrix.py_version }}"
44+ - name : Set up uv and enable cache
45+ id : setup-uv
46+ uses : astral-sh/setup-uv@v7
4347 with :
48+ enable-cache : true
49+ cache-suffix : " ${{ matrix.py_version }}"
50+ version : " latest"
4451 python-version : " ${{ matrix.py_version }}"
45- - name : Update pip
46- run : python -m pip install -U pip
47- - name : Install poetry
48- run : python -m pip install poetry
4952 - name : Install deps
50- run : poetry install
51- env :
52- POETRY_VIRTUALENVS_CREATE : false
53- - name : Run pytest check
54- run : poetry run pytest -vv -n auto --cov="taskiq_redis" .
55- - name : Generate report
56- run : poetry run coverage xml
53+ run : uv sync --all-extras
54+ - name : Run pytest
55+ run : uv run pytest -vv -n auto --cov="taskiq_redis" .
56+ - name : Generate coverage report
57+ run : uv run coverage xml
5758 - name : Upload coverage reports to Codecov with GitHub Action
58- uses : codecov/codecov-action@v3
59- if : matrix.py_version == '3.9 '
59+ uses : codecov/codecov-action@v4
60+ if : matrix.py_version == '3.10 '
6061 with :
6162 token : ${{ secrets.CODECOV_TOKEN }}
6263 fail_ci_if_error : false
0 commit comments