Skip to content
This repository has been archived by the owner on Jun 8, 2022. It is now read-only.

Commit

Permalink
Circleci
Browse files Browse the repository at this point in the history
  • Loading branch information
ovv committed Jul 25, 2019
1 parent 2adb7c2 commit 0306449
Show file tree
Hide file tree
Showing 3 changed files with 89 additions and 16 deletions.
75 changes: 75 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
version: 2

workflows:
version: 2
test_and_deploy:
jobs:
- test-3.7
- test-3.6
- lint
- docs
- pypi:
requires:
- test-3.7
- test-3.6
- lint
- docs
filters:
tags:
only: /^v.*/


jobs:
test-3.7: &test-template
docker:
- image: circleci/python:3.7.3
environment:
TOXENV: py37
steps:
- checkout
- restore_cache:
keys:
- 'venv-{{ checksum "poetry.lock" }}'
- 'tox-{{ checksum "poetry.lock" }}'
- run: |
python3 -m venv .venv
source .venv/bin/activate
pip install -U poetry tox
- save_cache:
key: 'venv-{{ checksum "poetry.lock" }}'
paths:
- .venv
- run: |
source .venv/bin/activate
tox
- save_cache:
key: 'tox-{{ checksum "poetry.lock" }}'
paths:
- .tox
- .mypy_cache
- store_test_results:
path: .tox/py37/artifacts/
test-3.6:
<<: *test-template
docker:
- image: circleci/python:3.6.8
environment:
TOXENV: py36
lint:
<<: *test-template
environment:
TOXENV: lint
docs:
<<: *test-template
environment:
TOXENV: docs
pypi:
docker:
- image: circleci/python:3.7.3
steps:
- checkout
- restore_cache:
keys:
- 'venv-{{ checksum "poetry.lock" }}'
- run: |
poetry publish --username Ovv --password $PYPI_PASS --build
10 changes: 5 additions & 5 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 9 additions & 11 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
[tox]
envlist = format, pytest, py36, py37
envlist = format, lint, docs, py36, py37
skipsdist= True

[testenv]
whitelist_externals = poetry
commands =
poetry install -E requests -E aiohttp -E curio -E trio
poetry run pytest test --verbose --cov
poetry build

[testenv:format]
whitelist_externals = poetry
Expand All @@ -15,21 +16,18 @@ commands =
poetry run black slack examples
poetry run isort --recursive slack examples


[testenv:pytest]
whitelist_externals = poetry
commands =
poetry install -E requests -E aiohttp -E curio -E trio
poetry run pytest test --verbose --cov

[testenv:py37]
[testenv:lint]
whitelist_externals = poetry
commands =
poetry install -E requests -E aiohttp -E curio -E trio
poetry run flake8 .
poetry run black --check --diff slack examples
poetry run isort --recursive --check-only slack examples
poetry run mypy slack/
poetry run pytest test --verbose --cov
poetry run sphinx-build docs/ docs/_build -W
poetry build

[testenv:docs]
whitelist_externals = poetry
commands =
poetry install -E requests -E aiohttp -E curio -E trio
poetry run sphinx-build docs/ docs/_build -W

0 comments on commit 0306449

Please sign in to comment.