From 400a98de921cf1c8f43f66dd1b8387a9f74f9b4a Mon Sep 17 00:00:00 2001 From: Daniel Gallagher Date: Mon, 11 Jun 2018 09:12:27 -0700 Subject: [PATCH] Add tox env for running mypy and add that to .travis.yml --- .travis.yml | 3 ++- tox.ini | 9 ++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index d0eb834b..399ce134 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,9 +13,10 @@ matrix: python: pypy-5.7.1 - env: TOXENV=pre-commit python: 3.6 + - env: TOXENV=mypy + python: 3.6 install: - pip install coveralls tox - - if [[ $TRAVIS_PYTHON_VERSION == '3.6' ]]; then pip install mypy; fi script: tox after_success: coveralls cache: diff --git a/tox.ini b/tox.ini index cf538bb7..8166a5b6 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = flake8,py27,py33,py34,py35,py36,pre-commit,pypy +envlist = flake8,py27,py33,py34,py35,py36,pre-commit,pypy,mypy skipsdist = true [testenv] @@ -18,6 +18,13 @@ setenv = commands = pre-commit {posargs:run --all-files} +[testenv:mypy] +basepython=python3.6 +deps = + mypy +commands = + mypy graphene + [testenv:flake8] deps = flake8 commands =