Skip to content

Commit

Permalink
Poetry (#154)
Browse files Browse the repository at this point in the history
* Add poetry
* remove tox
* fix rpx tests
* report coverage only from linux tests
* fix pytest command
* fix macos without uvloop
* no test 3.11 on macos
* ignore IO error when logging trying to flush at exit
* unregister atexit on handler del
* Fix aggregate tests (#155)
* Fix aggregate tests more (#156)
* Pin logging-journald
* mypy fixes in tests and refactor io
* mypy fixes in tests
* fixes
* test syncronization
* upgrade packages
* pylama fixes
* skip profiler tests on old python versions
* add reason
* fix version
* bump to 16.3.0
* move pylyma config to pyproject.toml
* add version
* remove warning for worker_pool
* fix setattr and getattr
* linter fixes
* add __all__ for version
* Improve documentation
* rework publish action
* improve docs
* fixes
* add semver summary
* rework how to develop article
* improve docs
* Add compression for io
* Add translations
* Use AnyStr
* Fix tests
* revert pylama.ini
* Update copyright
* fix precommit hook
* add typevar for io wrap_to_thread
* Add precommit and poem-plugins info to the README.rst

Co-authored-by: Nikitin Artyom <tzoiker@gmail.com>
  • Loading branch information
mosquito and tzoiker authored Jan 23, 2023
1 parent e0ca892 commit fad39b4
Show file tree
Hide file tree
Showing 77 changed files with 9,236 additions and 1,561 deletions.
149 changes: 0 additions & 149 deletions .drone.yml

This file was deleted.

20 changes: 8 additions & 12 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: publish

on:
Expand All @@ -27,17 +24,16 @@ jobs:
- name: Resetting git to master
run: git fetch --unshallow --tags || true

- name: Bump package version
run: python3 bump.py aiomisc/version.py
- name: Install poetry
run: python3 -m pip install poetry

- name: Install requires
run: python3 -m pip install twine wheel
- name: Install poem-plugins
run: poetry self add poem-plugins

- name: Build source package
run: python3 setup.py sdist bdist_wheel
- name: Install package
run: poetry install

- name: Publishing to pypi
run: twine upload --skip-existing --disable-progress-bar dist/*.tar.gz dist/*.whl
run: poetry publish --build
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}
172 changes: 172 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,172 @@
name: tests

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
pylama:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup python3.10
uses: actions/setup-python@v2
with:
python-version: "3.10"
- run: python -m pip install poetry
- run: poetry install
- run: poetry run pylama
env:
FORCE_COLOR: 1
mypy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup python3.10
uses: actions/setup-python@v2
with:
python-version: "3.10"
- run: python -m pip install poetry
- run: poetry install
- run: poetry run mypy
env:
FORCE_COLOR: 1
docs-examples:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup python3.10
uses: actions/setup-python@v2
with:
python-version: "3.10"
- run: python -m pip install poetry
- run: poetry install
- run: poetry run pytest -svv docs/source
env:
FORCE_COLOR: 1

tests-on-linux:
runs-on: ubuntu-latest

strategy:
fail-fast: false

matrix:
python:
- '3.7'
- '3.8'
- '3.9'
- '3.10'
- '3.11'
steps:
- uses: actions/checkout@v2
- name: Setup python${{ matrix.python }}
uses: actions/setup-python@v2
with:
python-version: "${{ matrix.python }}"
- run: python -m pip install poetry
- run: poetry install --with=uvloop
- run: >-
poetry run pytest \
-vv \
--cov=aiomisc \
--cov=aiomisc_log \
--cov=aiomisc_pytest \
--cov=aiomisc_worker \
--cov-report=term-missing \
--doctest-modules \
--aiomisc-test-timeout=120 \
tests
env:
FORCE_COLOR: 1
- run: poetry run coveralls
env:
COVERALLS_PARALLEL: 'true'
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

tests-on-macos:
runs-on: macos-latest

strategy:
fail-fast: false

matrix:
python:
- '3.9'
- '3.10'
steps:
- uses: actions/checkout@v2
- name: Setup python${{ matrix.python }}
uses: actions/setup-python@v2
with:
python-version: "${{ matrix.python }}"
- run: python -m pip install poetry
- run: poetry install --without=uvloop
- run: poetry run pytest -vv --aiomisc-test-timeout=120 tests
env:
FORCE_COLOR: 1

tests-on-windows:
runs-on: windows-latest

strategy:
fail-fast: false

matrix:
python:
- '3.9'
- '3.10'
- '3.11'
steps:
- uses: actions/checkout@v2
- name: Setup python${{ matrix.python }}
uses: actions/setup-python@v2
with:
python-version: "${{ matrix.python }}"
- run: python -m pip install poetry
- run: poetry install --without=uvloop
- run: poetry run pytest -vv --aiomisc-test-timeout=120 tests
env:
FORCE_COLOR: 1

tests-rpc-example:
runs-on: ubuntu-latest

strategy:
fail-fast: false

matrix:
example:
- 'rpc'
- 'rpc_udp'
steps:
- uses: actions/checkout@v2
- name: Setup python3.10
uses: actions/setup-python@v2
with:
python-version: "3.10"
- run: python -m pip install poetry
- run: poetry install --with=uvloop
- run: poetry run python -m pip install msgspec~=0.9.1
- run: >-
cd examples/${{ matrix.example }} &&
poetry run pytest -v --doctest-modules tests.py
env:
FORCE_COLOR: 1
finish:
needs:
- tests-on-linux
- tests-on-macos
- tests-on-windows
- tests-rpc-example
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.github_token }}
parallel-finished: true
Loading

0 comments on commit fad39b4

Please sign in to comment.