|
6 | 6 | lint: |
7 | 7 | strategy: |
8 | 8 | matrix: |
9 | | - cmd: |
10 | | - - black |
11 | | - - ruff |
12 | | - - mypy |
| 9 | + cmd: [ "black", "ruff", "mypy" ] |
13 | 10 | runs-on: ubuntu-latest |
14 | 11 | steps: |
15 | | - - uses: actions/checkout@v4 |
16 | | - - name: Install poetry |
17 | | - run: pipx install poetry |
18 | | - - name: Set up Python |
19 | | - uses: actions/setup-python@v4 |
| 12 | + - uses: actions/checkout@v5 |
| 13 | + - id: setup-uv |
| 14 | + uses: astral-sh/setup-uv@v7 |
20 | 15 | with: |
21 | | - python-version: "3.11" |
22 | | - cache: "poetry" |
| 16 | + enable-cache: true |
| 17 | + cache-suffix: "3.12" |
| 18 | + version: "latest" |
| 19 | + python-version: "3.12" |
23 | 20 | - name: Install deps |
24 | | - run: poetry install |
| 21 | + run: uv sync --all-extras |
25 | 22 | - name: Run lint check |
26 | | - run: poetry run pre-commit run -a ${{ matrix.cmd }} |
| 23 | + run: uv run pre-commit run -a ${{ matrix.cmd }} |
27 | 24 | pytest: |
28 | 25 | strategy: |
29 | 26 | matrix: |
30 | | - py_version: ["3.9", "3.10", "3.11", "3.12", "3.13"] |
| 27 | + py_version: [ "3.10", "3.11", "3.12", "3.13" ] |
31 | 28 | runs-on: "ubuntu-latest" |
32 | 29 | steps: |
33 | | - - uses: actions/checkout@v4 |
| 30 | + - uses: actions/checkout@v5 |
34 | 31 | - name: Set up PostgreSQL |
35 | | - uses: ikalnytskyi/action-setup-postgres@v4 |
| 32 | + uses: ikalnytskyi/action-setup-postgres@v8 |
36 | 33 | with: |
37 | 34 | username: postgres |
38 | 35 | password: postgres |
39 | 36 | database: taskiqpsqlpy |
40 | 37 | id: postgres |
41 | | - - name: Set up Python |
42 | | - uses: actions/setup-python@v2 |
| 38 | + - name: Set up uv and enable cache |
| 39 | + id: setup-uv |
| 40 | + uses: astral-sh/setup-uv@v7 |
43 | 41 | with: |
| 42 | + enable-cache: true |
| 43 | + cache-suffix: "${{ matrix.py_version }}" |
| 44 | + version: "latest" |
44 | 45 | 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 |
49 | 46 | - 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_psqlpy" . |
55 | | - - name: Generate report |
56 | | - run: poetry run coverage xml |
| 47 | + run: uv sync --all-extras |
| 48 | + - name: Run pytest |
| 49 | + run: uv run pytest -vv -n auto --cov="taskiq_psqlpy" . |
| 50 | + - name: Generate coverage report |
| 51 | + run: uv run coverage xml |
57 | 52 | - name: Upload coverage reports to Codecov with GitHub Action |
58 | | - uses: codecov/codecov-action@v3 |
59 | | - if: matrix.py_version == '3.9' |
| 53 | + uses: codecov/codecov-action@v5 |
| 54 | + if: matrix.py_version == '3.10' |
60 | 55 | with: |
61 | 56 | token: ${{ secrets.CODECOV_TOKEN }} |
62 | 57 | fail_ci_if_error: false |
|
0 commit comments