Compare commits

...

36 Commits

Author SHA1 Message Date
Roman Mogylatov
8002ce71a8 Add experimental aarch64 builds 2021-01-26 09:35:00 -05:00
Roman Mogylatov
021e2e5bde Rename build wheels job 2021-01-26 09:22:31 -05:00
Roman Mogylatov
15ab192bc7 Refactor to two stages build 2021-01-26 09:21:02 -05:00
Roman Mogylatov
210f8bd25e Fix windows builds 2021-01-26 09:05:40 -05:00
Roman Mogylatov
7db553a355 Add publishing wheels on mac and windows 2021-01-26 08:58:27 -05:00
Roman Mogylatov
3fb5f134ee Bump version 2021-01-26 08:26:50 -05:00
Roman Mogylatov
fe5c33b8a2 Add linux x64 wheels publishing job 2021-01-26 08:26:23 -05:00
Roman Mogylatov
e3defb6596 Change publishing workflow name 2021-01-26 08:21:33 -05:00
Roman Mogylatov
5345f3db42 Update publishing workflow to publish to test server 2021-01-26 08:16:22 -05:00
Roman Mogylatov
9971d4bb27 Try quote asteriks 2021-01-26 08:13:54 -05:00
Roman Mogylatov
5ea7612687 Add publishing workflow 2021-01-26 08:12:33 -05:00
Roman Mogylatov
375a6ec192 Add pull_request event for tests and linters jobs 2021-01-26 07:55:20 -05:00
Roman Mogylatov
e357db77d7 Rename tests and linters workflow 2021-01-26 07:51:38 -05:00
Roman Mogylatov
c6fb0bf018 Create common linters job 2021-01-26 07:47:03 -05:00
Roman Mogylatov
784bb5fed2 Move branch name 2021-01-26 07:41:27 -05:00
Roman Mogylatov
cf06014779 Move linters to tests workflow 2021-01-26 07:38:41 -05:00
Roman Mogylatov
35320d3da6 Add linters workflow 2021-01-26 07:32:13 -05:00
Roman Mogylatov
011f6c2dc3 Refactor tests workflow 2021-01-26 07:31:30 -05:00
Roman Mogylatov
ff0587229e Re-arrange run actions 2021-01-25 18:49:37 -05:00
Roman Mogylatov
6098a56896 Update tox.ini 2021-01-25 18:46:10 -05:00
Roman Mogylatov
500be25220 Update tox.ini to pass env variables 2021-01-25 18:42:16 -05:00
Roman Mogylatov
9cb37cf004 Set branch name and token 2021-01-25 18:34:48 -05:00
Roman Mogylatov
13d2e5c977 Try set branch name 2021-01-25 18:30:41 -05:00
Roman Mogylatov
7e21c5df46 Add COVERALLS_GIT_BRANCH 2021-01-25 18:23:22 -05:00
Roman Mogylatov
b66ccd0769 Update run and env sections 2021-01-25 18:18:04 -05:00
Roman Mogylatov
b166a003ab Update env sections 2021-01-25 18:15:08 -05:00
Roman Mogylatov
210c1676c5 Change coverage job name 2021-01-25 18:07:17 -05:00
Roman Mogylatov
72b397318d Fix coveralls token passing 2021-01-25 18:04:21 -05:00
Roman Mogylatov
b0cb18595c Try to add manual trigger for tests 2021-01-25 18:01:20 -05:00
Roman Mogylatov
bf23caa20a Add tests coverage job 2021-01-25 17:53:53 -05:00
Roman Mogylatov
2bdb73d7ec Add PyPy and PyPy3 jobs 2021-01-25 17:41:24 -05:00
Roman Mogylatov
e95d1040a1 Add Python 2.7 job 2021-01-25 17:35:41 -05:00
Roman Mogylatov
3ae7bf438a Add Python 3.4 2021-01-25 17:32:36 -05:00
Roman Mogylatov
835a2a8f53 Add jobs for Python 3.5, 3.6, 3.7 2021-01-25 17:32:36 -05:00
Roman Mogylatov
d7927bf735 Try run tests on multiple versions 2021-01-25 17:32:36 -05:00
Roman Mogylatov
72f081a91d Add tests config 2021-01-25 17:32:36 -05:00
4 changed files with 152 additions and 7 deletions

86
.github/workflows/publishing.yml vendored Normal file
View File

@ -0,0 +1,86 @@
name: Building and publishing
on:
push:
tags:
- '*'
jobs:
build-sdist:
name: Build source tarball
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.9
- run: python setup.py sdist
- uses: actions/upload-artifact@v2
with:
path: ./dist/*
build-wheels:
name: Build wheels
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.9
- run: pip install cibuildwheel==1.8.0
- name: Install Visual C++ for Python 2.7 on Windows
if: runner.os == 'Windows'
run: |
choco install vcpython27 -f -y
- run: cibuildwheel --output-dir wheelhouse
- uses: actions/upload-artifact@v2
with:
path: ./wheelhouse/*.whl
build-wheels-linux-custom-archs:
name: Build wheels
runs-on: ubuntu-latest
strategy:
matrix:
arch: [aarch64]
steps:
- uses: actions/checkout@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- uses: actions/setup-python@v2
with:
python-version: 3.9
- run: pip install cibuildwheel==1.8.0
- run: cibuildwheel --archs ${{ matrix.archs }} --output-dir wheelhouse
- uses: actions/upload-artifact@v2
with:
path: ./wheelhouse/*.whl
upload-to-pypi:
name: Publish on PyPI
needs: [build-sdist, build-wheels, build-wheels-linux-custom-archs]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v2
with:
name: artifact
path: dist
- uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
# - services: docker
# arch: arm64
# if: tag IS present
# env: TWINE_USERNAME=__token__
# install: python3 -m pip install cibuildwheel==1.6.3
# script: python3 -m cibuildwheel --output-dir wheelhouse
# after_success:
# - python3 -m pip install --upgrade --upgrade-strategy eager twine
# - python3 -m twine upload wheelhouse/*.whl

59
.github/workflows/tests-and-linters.yml vendored Normal file
View File

@ -0,0 +1,59 @@
name: Tests and linters
on: [push, pull_request, workflow_dispatch]
jobs:
test-on-different-versions:
name: Run tests
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [2.7, 3.4, 3.5, 3.6, 3.7, 3.8, 3.9, pypy2, pypy3]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- run: pip install tox
- run: tox
env:
TOXENV: ${{ matrix.python-version }}
test-coverage:
name: Run tests with coverage
runs-on: ubuntu-latest
env:
DEPENDENCY_INJECTOR_DEBUG_MODE: 1
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
steps:
- name: Get the current branch name
shell: bash
run: echo "::set-output name=branch::${GITHUB_REF#refs/heads/}"
id: branch-name
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.9
- run: pip install tox cython
- run: make cythonize
- run: tox
env:
TOXENV: coveralls
COVERALLS_GIT_BRANCH: ${{ steps.branch-name.outputs.branch }}
linters:
name: Run linters
runs-on: ubuntu-latest
strategy:
matrix:
toxenv: [flake8, pydocstyle, mypy, pylint]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.9
- run: pip install tox
- run: tox
env:
TOXENV: ${{ matrix.toxenv }}

View File

@ -1,6 +1,6 @@
"""Top-level package.""" """Top-level package."""
__version__ = '4.10.3-dev' __version__ = '4.10.3dev5'
"""Version number. """Version number.
:type: str :type: str

12
tox.ini
View File

@ -1,6 +1,6 @@
[tox] [tox]
envlist= envlist=
coveralls, pylint, flake8, pydocstyle, py27, py34, py35, py36, py37, py38, pypy, pypy3 coveralls, pylint, flake8, pydocstyle, 2.7, 3.4, 3.5, 3.6, 3.7, 3.8, 3.9, pypy2, pypy3
[testenv] [testenv]
deps= deps=
@ -17,7 +17,7 @@ commands=
unit2 discover -s tests/unit -p test_*_py3*.py unit2 discover -s tests/unit -p test_*_py3*.py
[testenv:coveralls] [testenv:coveralls]
passenv=TRAVIS TRAVIS_JOB_ID TRAVIS_BRANCH DEPENDENCY_INJECTOR_DEBUG_MODE passenv=COVERALLS_GIT_BRANCH COVERALLS_REPO_TOKEN
basepython=python3.9 basepython=python3.9
usedevelop=True usedevelop=True
deps= deps=
@ -31,7 +31,7 @@ commands=
coverage report --rcfile=./.coveragerc coverage report --rcfile=./.coveragerc
coveralls coveralls
[testenv:py27] [testenv:2.7]
deps= deps=
unittest2 unittest2
extras= extras=
@ -40,7 +40,7 @@ extras=
commands= commands=
unit2 discover -s tests/unit -p test_*_py2_py3.py unit2 discover -s tests/unit -p test_*_py2_py3.py
[testenv:py34] [testenv:3.4]
deps= deps=
unittest2 unittest2
extras= extras=
@ -48,7 +48,7 @@ extras=
commands= commands=
unit2 discover -s tests/unit -p test_*_py3.py unit2 discover -s tests/unit -p test_*_py3.py
[testenv:py35] [testenv:3.5]
deps= deps=
unittest2 unittest2
extras= extras=
@ -57,7 +57,7 @@ extras=
commands= commands=
unit2 discover -s tests/unit -p test_*_py3.py unit2 discover -s tests/unit -p test_*_py3.py
[testenv:pypy] [testenv:pypy2]
deps= deps=
unittest2 unittest2
extras= extras=