@@ -2,87 +2,82 @@ name: Testing package
22
33on :
44 pull_request :
5+ paths-ignore :
6+ - ' *.md'
57 push :
8+ paths-ignore :
9+ - ' *.md'
10+
11+ permissions :
12+ actions : read
13+ contents : read
14+ pull-requests : read
615
716jobs :
817 lint :
918 strategy :
1019 matrix :
11- cmd :
12- - black
13- - flake8
14- - isort
15- - mypy
16- - autoflake
20+ cmd : ["black", "ruff", "mypy"]
1721 runs-on : ubuntu-latest
1822 steps :
19- - uses : actions/checkout@v2
20- - name : Install poetry
21- run : pipx install poetry
22- - name : Set up Python
23- uses : actions /setup-python@v4
23+ - uses : actions/checkout@v5
24+ with :
25+ persist-credentials : false
26+ - id : setup-uv
27+ uses : astral-sh /setup-uv@v7
2428 with :
25- python-version : " 3.9"
26- cache : " poetry"
29+ enable-cache : true
30+ cache-suffix : 3.11
31+ version : " latest"
32+ python-version : 3.11
2733 - name : Install deps
28- run : poetry install
34+ run : uv sync --all-extras
2935 - name : Run lint check
30- run : poetry run pre-commit run -a ${{ matrix.cmd }}
36+ run : uv run pre-commit run -a ${{ matrix.cmd }}
3137 pytest :
3238 services :
33- zookeeper :
34- image : bitnami/zookeeper:3.8.1
35- ports :
36- - 2181:2181
37- env :
38- ALLOW_ANONYMOUS_LOGIN : yes
39- options : >-
40- --health-cmd "echo mntr | nc -w 2 -q 2 localhost 2181"
41- --health-interval 10s
42- --health-timeout 5s
43- --health-retries 5
4439 kafka :
45- image : bitnami /kafka:3.4 .1
40+ image : apache /kafka:4.1 .1
4641 ports :
4742 - 9092:9092
4843 options : >-
49- --health-cmd "kafka-broker-api-versions.sh --version "
44+ --health-cmd "kafka-broker-api-versions.sh --bootstrap-server localhost:9092 "
5045 --health-interval 10s
5146 --health-timeout 5s
5247 --health-retries 5
5348 env :
54- KAFKA_CFG_ZOOKEEPER_CONNECT : zookeeper:2181
55- ALLOW_PLAINTEXT_LISTENER : yes
56- KAFKA_CFG_LISTENERS : PLAINTEXT://:9092
57- KAFKA_CFG_ADVERTISED_LISTENERS : PLAINTEXT://127.0.0.1:9092
58- KAFKA_ENABLE_KRAFT : " no"
59- permissions :
60- checks : write
61- pull-requests : write
62- contents : write
49+ KAFKA_NODE_ID : 1
50+ KAFKA_PROCESS_ROLES : broker,controller
51+ KAFKA_LISTENERS : PLAINTEXT://0.0.0.0:9092,CONTROLLER://localhost:9093
52+ KAFKA_ADVERTISED_LISTENERS : PLAINTEXT://localhost:9092
53+ KAFKA_CONTROLLER_LISTENER_NAMES : CONTROLLER
54+ KAFKA_LISTENER_SECURITY_PROTOCOL_MAP : CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT
55+ KAFKA_CONTROLLER_QUORUM_VOTERS : 1@localhost:9093
6356 strategy :
6457 matrix :
65- py_version : ["3.9 ", "3.10 ", "3.11 "]
58+ py_version : ["3.10 ", "3.11 ", "3.12", "3.13 "]
6659 os : [ubuntu-latest]
6760 runs-on : " ${{ matrix.os }}"
6861 steps :
69- - uses : actions/checkout@v2
70- - name : Install poetry
71- run : pipx install poetry
72- - name : Set up Python
73- uses : actions /setup-python@v4
62+ - uses : actions/checkout@v5
63+ with :
64+ persist-credentials : false
65+ - id : setup-uv
66+ uses : astral-sh /setup-uv@v7
7467 with :
75- python-version : " ${{ matrix.py_version }}"
76- cache : " poetry"
68+ enable-cache : true
69+ cache-suffix : ${{ matrix.py_version }}
70+ version : " latest"
71+ python-version : ${{ matrix.py_version }}
7772 - name : Install deps
78- run : poetry install
73+ run : uv sync --all-extras
7974 - name : Run pytest check
80- run : poetry run pytest -vv -n auto --cov="taskiq_aio_kafka" .
75+ run : uv run pytest -vv -n auto --cov="taskiq_aio_kafka" .
8176 - name : Generate report
82- run : poetry run coverage xml
77+ run : uv run coverage xml
8378 - name : Upload coverage reports to Codecov with GitHub Action
84- uses : codecov/codecov-action@v3
85- if : matrix.os == 'ubuntu-latest' && matrix.py_version == '3.9 '
79+ uses : codecov/codecov-action@v5
80+ if : matrix.os == 'ubuntu-latest' && matrix.py_version == '3.10 '
8681 with :
8782 token : ${{ secrets.CODECOV_TOKEN }}
8883 fail_ci_if_error : false
0 commit comments