|
1 | 1 | name: Testing taskiq-nats |
2 | 2 |
|
3 | | -on: pull_request |
| 3 | +on: |
| 4 | + pull_request: |
| 5 | + paths-ignore: |
| 6 | + - '*.md' |
| 7 | + |
| 8 | +permissions: |
| 9 | + actions: read |
| 10 | + contents: read |
| 11 | + pull-requests: read |
4 | 12 |
|
5 | 13 | jobs: |
6 | 14 | lint: |
7 | 15 | strategy: |
8 | 16 | matrix: |
9 | | - cmd: |
10 | | - - black |
11 | | - - ruff |
12 | | - - mypy |
| 17 | + cmd: ["black", "ruff", "mypy"] |
13 | 18 | runs-on: ubuntu-latest |
14 | 19 | 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 |
| 20 | + - uses: actions/checkout@v5 |
| 21 | + with: |
| 22 | + persist-credentials: false |
| 23 | + - id: setup-uv |
| 24 | + uses: astral-sh/setup-uv@v7 |
20 | 25 | with: |
21 | | - python-version: "3.11" |
22 | | - cache: "poetry" |
| 26 | + enable-cache: true |
| 27 | + cache-suffix: 3.11 |
| 28 | + version: "latest" |
| 29 | + python-version: 3.11 |
23 | 30 | - name: Install deps |
24 | | - run: poetry install |
| 31 | + run: uv sync --all-extras |
25 | 32 | - name: Run lint check |
26 | | - run: poetry run pre-commit run -a ${{ matrix.cmd }} |
| 33 | + run: uv run pre-commit run -a ${{ matrix.cmd }} |
27 | 34 | pytest: |
28 | 35 | strategy: |
29 | 36 | matrix: |
30 | | - py_version: ["3.8", "3.9", "3.10", "3.11", "3.12"] |
| 37 | + py_version: ["3.10", "3.11", "3.12", "3.13"] |
31 | 38 | runs-on: "ubuntu-latest" |
32 | 39 | steps: |
33 | | - - uses: actions/checkout@v4 |
34 | | - - name: Set up Python |
35 | | - uses: actions/setup-python@v2 |
| 40 | + - uses: actions/checkout@v5 |
| 41 | + with: |
| 42 | + persist-credentials: false |
| 43 | + - id: setup-uv |
| 44 | + uses: astral-sh/setup-uv@v7 |
36 | 45 | with: |
37 | | - python-version: "${{ matrix.py_version }}" |
38 | | - - name: Update pip |
39 | | - run: python -m pip install -U pip |
40 | | - - name: Install poetry |
41 | | - run: python -m pip install poetry |
| 46 | + enable-cache: true |
| 47 | + cache-suffix: ${{ matrix.py_version }} |
| 48 | + version: "latest" |
| 49 | + python-version: ${{ matrix.py_version }} |
42 | 50 | - name: Install deps |
43 | | - run: poetry install |
44 | | - env: |
45 | | - POETRY_VIRTUALENVS_CREATE: false |
| 51 | + run: uv sync --all-extras |
46 | 52 | - name: Update docker-compose |
47 | 53 | uses: KengoTODA/actions-setup-docker-compose@v1 |
48 | 54 | with: |
49 | 55 | version: "2.16.0" |
50 | 56 | - name: docker compose up |
51 | 57 | run: docker-compose up -d --wait |
52 | 58 | - name: Run pytest check |
53 | | - run: poetry run pytest -vv -n auto --cov="taskiq_nats" . |
| 59 | + run: uv run pytest -vv -n auto --cov="taskiq_nats" . |
54 | 60 | - name: Generate report |
55 | | - run: poetry run coverage xml |
| 61 | + run: uv run coverage xml |
56 | 62 | - name: Upload coverage reports to Codecov with GitHub Action |
57 | | - uses: codecov/codecov-action@v3 |
58 | | - if: matrix.py_version == '3.9' |
| 63 | + uses: codecov/codecov-action@v5 |
| 64 | + if: matrix.py_version == '3.10' |
59 | 65 | with: |
60 | 66 | token: ${{ secrets.CODECOV_TOKEN }} |
61 | 67 | fail_ci_if_error: false |
|
0 commit comments