Skip to content

Commit adaf84a

Browse files
committed
Run tox on CircleCI
1 parent 5075b36 commit adaf84a

File tree

2 files changed

+48
-6
lines changed

2 files changed

+48
-6
lines changed

.circleci/config.yml

Lines changed: 45 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
version: 2
22
jobs:
3-
build:
3+
build_test:
44
docker:
55
- image: circleci/python:3.6.9
66
steps:
@@ -12,7 +12,7 @@ jobs:
1212

1313
- run:
1414
name: install dependencies
15-
command: poetry install -v -E flask
15+
command: poetry install -v -E flask -E quark
1616

1717
- save_cache:
1818
key: deps-{{ checksum "poetry.lock" }}
@@ -29,8 +29,50 @@ jobs:
2929
poetry run coverage run -m pytest .
3030
poetry run coveralls
3131
32+
tox:
33+
docker:
34+
- image: circleci/python:3.6.9
35+
steps:
36+
- checkout
37+
38+
- run:
39+
name: install pyenv
40+
command: |
41+
git clone https://github.com/pyenv/pyenv.git ~/.pyenv
42+
# ~/.local/bin is already in the path and the bash_profile doesn't get sourced between steps
43+
mkdir -p ~/.local/bin
44+
ln -s ~/.pyenv/bin/pyenv ~/.local/bin/
45+
46+
- restore_cache:
47+
keys:
48+
- deps-{{ checksum "poetry.lock" }}
49+
- pyenv-{{ checksum ".python-version" }}
50+
51+
- run:
52+
name: make sure tox is installed
53+
command: poetry install -v
54+
55+
- save_cache:
56+
key: deps-{{ checksum "poetry.lock" }}
57+
paths:
58+
- /home/circleci/.cache/pypoetry/virtualenvs
59+
60+
- run:
61+
name: install all Python versions
62+
command: cat .python-version | xargs -x -l1 pyenv install
63+
64+
- save_cache:
65+
key: pyenv-{{ checksum ".python-version" }}
66+
paths:
67+
- /home/circleci/.pyenv
68+
69+
- run:
70+
name: test across multiple Python / libraries versions
71+
command: poetry run tox -vv
72+
3273
workflows:
3374
version: 2
3475
build:
3576
jobs:
36-
- build
77+
- build_test
78+
- tox

.python-version

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
3.6.9
2-
3.7.4
3-
3.8
1+
3.8.3
2+
3.7.7
3+
3.6.10

0 commit comments

Comments
 (0)