| version: 2 |
| |
| jobs: |
| pep8: |
| docker: |
| - image: circleci/python:3.9 |
| steps: |
| - checkout |
| - run: |
| command: | |
| sudo pip install tox |
| tox -e pep8 |
| black: |
| docker: |
| - image: circleci/python:3.9 |
| steps: |
| - checkout |
| - run: |
| command: | |
| sudo pip install tox |
| tox -e black-ci |
| py36: |
| docker: |
| - image: circleci/python:3.6 |
| steps: |
| - checkout |
| - run: |
| command: | |
| sudo pip install tox |
| tox -e py36 |
| py37: |
| docker: |
| - image: circleci/python:3.7 |
| steps: |
| - checkout |
| - run: |
| command: | |
| sudo pip install tox |
| tox -e py37 |
| py38: |
| docker: |
| - image: circleci/python:3.8 |
| steps: |
| - checkout |
| - run: |
| command: | |
| sudo pip install tox |
| tox -e py38 |
| py39: |
| docker: |
| - image: circleci/python:3.9 |
| steps: |
| - checkout |
| - run: |
| command: | |
| sudo pip install tox |
| tox -e py39 |
| deploy: |
| docker: |
| - image: circleci/python:3.9 |
| steps: |
| - checkout |
| - run: | |
| python -m venv venv |
| - run: | |
| venv/bin/pip install twine wheel |
| - run: |
| name: init .pypirc |
| command: | |
| echo -e "[pypi]" >> ~/.pypirc |
| echo -e "username = __token__" >> ~/.pypirc |
| echo -e "password = $PYPI_TOKEN" >> ~/.pypirc |
| - run: |
| name: create packages |
| command: | |
| venv/bin/python setup.py sdist bdist_wheel |
| - run: |
| name: upload to PyPI |
| command: | |
| venv/bin/twine upload dist/* |
| |
| workflows: |
| version: 2 |
| |
| test: |
| jobs: |
| - pep8 |
| - black |
| - py36 |
| - py37 |
| - py38 |
| - py39 |
| - deploy: |
| filters: |
| tags: |
| only: /[0-9]+(\.[0-9]+)*/ |
| branches: |
| ignore: /.*/ |