Skip to content

Commit 010474b

Browse files
committed
Improve tox/travis configuration
1 parent 89b1a15 commit 010474b

File tree

2 files changed

+25
-26
lines changed

2 files changed

+25
-26
lines changed

.travis.yml

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,29 @@
11
language: python
22

3-
dist: xenial
4-
sudo: true
3+
matrix:
4+
include:
5+
- env: TOXENV=black,flake,mypy
6+
python: 3.7
7+
dist: xenial
8+
sudo: true
9+
- env: TOXENV=py37
10+
python: 3.7
11+
dist: xenial
12+
sudo: true
13+
- env: TOXENV=py36
14+
python: 3.6
515

6-
python:
7-
- 3.6
8-
- 3.7
16+
cache:
17+
directories:
18+
- $HOME/.cache/pip
19+
- $TRAVIS_BUILD_DIR/.tox
920

1021
install:
11-
- pip install "poetry==0.12.11"
12-
- poetry install
22+
- pip install "poetry==0.12.11"
23+
- poetry install
1324

1425
script:
15-
- flake8 --version
16-
- flake8 graphql tests
17-
- black --version
18-
- black graphql tests --check
19-
- mypy --version
20-
- mypy graphql
21-
- pytest --version
22-
- pytest --cov-report term-missing --cov=graphql
26+
- tox -e $TOX_ENV -- --cov-report term-missing --cov=graphql
2327

2428
after_success:
25-
- codecov
29+
- codecov

tox.ini

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,20 @@
11
[tox]
22
envlist = py{36,37}, black, flake8, mypy
33

4-
[travis]
5-
python =
6-
3.7: py37
7-
3.6: py36
8-
94
[testenv:black]
10-
basepython = python3.6
5+
basepython = python3.7
116
deps = black
127
commands =
138
black graphql tests --check
149

1510
[testenv:flake8]
16-
basepython = python3.6
11+
basepython = python3.7
1712
deps = flake8
1813
commands =
1914
flake8 graphql tests
2015

2116
[testenv:mypy]
22-
basepython = python3.6
17+
basepython = python3.7
2318
deps = mypy
2419
commands =
2520
mypy graphql
@@ -30,7 +25,7 @@ setenv =
3025
deps =
3126
pytest
3227
pytest-asyncio
28+
pytest-cov
3329
pytest-describe
3430
commands =
35-
python -m pip install -U pip
36-
pytest {posargs}
31+
pytest tests {posargs}

0 commit comments

Comments
 (0)