Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions .coveragerc

This file was deleted.

40 changes: 40 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Publish to PyPI

on:
release:
types: [published]

env:
FORCE_COLOR: 1

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: astral-sh/setup-uv@v5

- name: Set version from release tag
run: uv version "${GITHUB_REF_NAME#v}"

- name: Build package
run: uv build

- uses: actions/upload-artifact@v4
with:
name: dist
path: dist/

publish:
runs-on: ubuntu-latest
needs: build
environment: pypi
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v4
with:
name: dist
path: dist/

- uses: pypa/gh-action-pypi-publish@release/v1
78 changes: 30 additions & 48 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,42 +9,30 @@ on:


jobs:
pylama:
ruff:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v6
- name: Setup python3.10
uses: actions/setup-python@v2
uses: actions/setup-python@v6
with:
python-version: "3.10"
- name: Cache virtualenv
id: venv-cache
uses: actions/cache@v3
with:
path: .venv
key: venv-${{ runner.os }}-${{ github.job }}-${{ github.ref }}
- run: python -m pip install poetry
- run: poetry install
- run: poetry run pylama
- uses: astral-sh/setup-uv@v5
- run: uv sync
- run: uv run ruff check
env:
FORCE_COLOR: 1
mypy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v6
- name: Setup python3.10
uses: actions/setup-python@v2
uses: actions/setup-python@v6
with:
python-version: "3.10"
- name: Cache virtualenv
id: venv-cache
uses: actions/cache@v3
with:
path: .venv
key: venv-${{ runner.os }}-${{ github.job }}-${{ github.ref }}
- run: python -m pip install poetry
- run: poetry install
- run: poetry run mypy
- uses: astral-sh/setup-uv@v5
- run: uv sync
- run: uv run mypy
env:
FORCE_COLOR: 1
docs:
Expand All @@ -53,24 +41,21 @@ jobs:
rabbitmq:
image: docker://mosquito/aiormq-rabbitmq
ports:
- 5672:5672
- 5671:5671
- 5672:5672
- 15671:15671
- 15672:15672
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v6
- name: Setup python3.10
uses: actions/setup-python@v2
uses: actions/setup-python@v6
with:
python-version: "3.10"
- name: Cache virtualenv
id: venv-cache
uses: actions/cache@v3
with:
path: .venv
key: venv-${{ runner.os }}-${{ github.job }}-${{ github.ref }}
- run: python -m pip install poetry
- run: poetry install
- run: poetry run pytest -svv README.rst
- uses: astral-sh/setup-uv@v5
- run: uv sync
- run: uv run pytest -svv README.rst
env:
AMQP_URL: amqp://guest:guest@localhost//
FORCE_COLOR: 1

tests:
Expand All @@ -80,8 +65,10 @@ jobs:
rabbitmq:
image: docker://mosquito/aiormq-rabbitmq
ports:
- 5672:5672
- 5671:5671
- 5672:5672
- 15671:15671
- 15672:15672

strategy:
fail-fast: false
Expand All @@ -94,31 +81,26 @@ jobs:
- '3.13'
- '3.14'
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v6
- name: Setup python${{ matrix.python }}
uses: actions/setup-python@v2
uses: actions/setup-python@v6
with:
python-version: "${{ matrix.python }}"
- name: Cache virtualenv
id: venv-cache
uses: actions/cache@v3
with:
path: .venv
key: venv-${{ runner.os }}-${{ github.job }}-${{ github.ref }}-${{ matrix.python }}
- run: python -m pip install poetry
- run: poetry install --with=uvloop
- uses: astral-sh/setup-uv@v5
- run: uv sync --group uvloop
- name: pytest
run: >-
poetry run pytest \
uv run pytest \
-vv \
--cov=aiormq \
--cov-report=term-missing \
--doctest-modules \
--aiomisc-test-timeout=120 \
tests
env:
AMQP_URL: amqp://guest:guest@localhost//
FORCE_COLOR: 1
- run: poetry run coveralls
- run: uv run coveralls
env:
COVERALLS_PARALLEL: 'true'
COVERALLS_SERVICE_NAME: github
Expand Down
9 changes: 4 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
all: clean test

NAME:=$(shell poetry version -n | awk '{print $1}')
VERSION:=$(shell poetry version -s)
RABBITMQ_CONTAINER_NAME:=aiormq_rabbitmq
RABBITMQ_IMAGE:=mosquito/aiormq-rabbitmq

Expand All @@ -16,14 +14,15 @@ rabbitmq:
$(RABBITMQ_IMAGE)

upload:
poetry publish --build --skip-existing
uv build
uv publish

test:
poetry run pytest -vvx --cov=aiormq \
uv run pytest -vvx --cov=aiormq \
--cov-report=term-missing tests README.rst

clean:
rm -fr *.egg-info .tox

develop: clean
poetry install
uv sync
3 changes: 0 additions & 3 deletions gray.conf

This file was deleted.

Loading