@@ -11,52 +11,49 @@ 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
2518 with :
26- python-version : " 3.11"
27- cache : " poetry"
19+ persist-credentials : false
20+ - id : setup-uv
21+ uses : astral-sh/setup-uv@v7
22+ with :
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
41- - name : Set up Python
42- uses : actions/setup-python@v2
40+ - name : Set up uv and enable cache
41+ id : setup-uv
42+ uses : astral-sh/setup-uv@v7
4343 with :
44+ enable-cache : true
45+ cache-suffix : " ${{ matrix.py_version }}"
46+ version : " latest"
4447 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
4948 - 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
49+ run : uv sync --all-extras
50+ - name : Run pytest
51+ run : uv run pytest -vv -n auto --cov="taskiq_redis" .
52+ - name : Generate coverage report
53+ run : uv run coverage xml
5754 - name : Upload coverage reports to Codecov with GitHub Action
58- uses : codecov/codecov-action@v3
59- if : matrix.py_version == '3.9 '
55+ uses : codecov/codecov-action@v5
56+ if : matrix.py_version == '3.10 '
6057 with :
6158 token : ${{ secrets.CODECOV_TOKEN }}
6259 fail_ci_if_error : false
0 commit comments