mirror of
https://github.com/graphql-python/graphene.git
synced 2024-11-29 04:53:55 +03:00
Update .travis.yml file to use tox as script for running tests
This commit is contained in:
parent
28f6353212
commit
013c9e5077
75
.travis.yml
75
.travis.yml
|
@ -1,64 +1,23 @@
|
||||||
language: python
|
language: python
|
||||||
sudo: false
|
python: 3.6
|
||||||
python:
|
env: # These should match the tox env list.
|
||||||
- 2.7
|
- TOXENV=flake8
|
||||||
- 3.5
|
- TOXENV=py27
|
||||||
- 3.6
|
- TOXENV=py33
|
||||||
# - "pypy-5.3.1"
|
- TOXENV=py34
|
||||||
before_install:
|
- TOXENV=py35
|
||||||
- |
|
- TOXENV=py36
|
||||||
if [ "$TRAVIS_PYTHON_VERSION" = "pypy" ]; then
|
- TOXENV=pypy
|
||||||
export PYENV_ROOT="$HOME/.pyenv"
|
- TOXENV=pre-commit
|
||||||
if [ -f "$PYENV_ROOT/bin/pyenv" ]; then
|
|
||||||
cd "$PYENV_ROOT" && git pull
|
|
||||||
else
|
|
||||||
rm -rf "$PYENV_ROOT" && git clone --depth 1 https://github.com/yyuu/pyenv.git "$PYENV_ROOT"
|
|
||||||
fi
|
|
||||||
export PYPY_VERSION="4.0.1"
|
|
||||||
"$PYENV_ROOT/bin/pyenv" install "pypy-$PYPY_VERSION"
|
|
||||||
virtualenv --python="$PYENV_ROOT/versions/pypy-$PYPY_VERSION/bin/python" "$HOME/virtualenvs/pypy-$PYPY_VERSION"
|
|
||||||
source "$HOME/virtualenvs/pypy-$PYPY_VERSION/bin/activate"
|
|
||||||
fi
|
|
||||||
install:
|
|
||||||
- |
|
|
||||||
if [ "$TEST_TYPE" = build ]; then
|
|
||||||
pip install -e .[test]
|
|
||||||
python setup.py develop
|
|
||||||
elif [ "$TEST_TYPE" = lint ]; then
|
|
||||||
pip install flake8
|
|
||||||
elif [ "$TEST_TYPE" = mypy ]; then
|
|
||||||
pip install mypy
|
|
||||||
fi
|
|
||||||
script:
|
|
||||||
- |
|
|
||||||
if [ "$TEST_TYPE" = lint ]; then
|
|
||||||
echo "Checking Python code lint."
|
|
||||||
flake8 graphene
|
|
||||||
exit
|
|
||||||
elif [ "$TEST_TYPE" = mypy ]; then
|
|
||||||
echo "Checking Python types."
|
|
||||||
mypy graphene
|
|
||||||
exit
|
|
||||||
elif [ "$TEST_TYPE" = build ]; then
|
|
||||||
py.test --cov=graphene graphene examples
|
|
||||||
fi
|
|
||||||
after_success:
|
|
||||||
- |
|
|
||||||
if [ "$TEST_TYPE" = build ]; then
|
|
||||||
coveralls
|
|
||||||
fi
|
|
||||||
env:
|
|
||||||
matrix:
|
|
||||||
- TEST_TYPE=build
|
|
||||||
global:
|
global:
|
||||||
secure: SQC0eCWCWw8bZxbLE8vQn+UjJOp3Z1m779s9SMK3lCLwJxro/VCLBZ7hj4xsrq1MtcFO2U2Kqf068symw4Hr/0amYI3HFTCFiwXAC3PAKXeURca03eNO2heku+FtnQcOjBanExTsIBQRLDXMOaUkf3MIztpLJ4LHqMfUupKmw9YSB0v40jDbSN8khBnndFykmOnVVHznFp8USoN5F0CiPpnfEvHnJkaX76lNf7Kc9XNShBTTtJsnsHMhuYQeInt0vg9HSjoIYC38Tv2hmMj1myNdzyrHF+LgRjI6ceGi50ApAnGepXC/DNRhXROfECKez+LON/ZSqBGdJhUILqC8A4WmWmIjNcwitVFp3JGBqO7LULS0BI96EtSLe8rD1rkkdTbjivajkbykM1Q0Tnmg1adzGwLxRUbTq9tJQlTTkHBCuXIkpKb1mAtb/TY7A6BqfnPi2xTc/++qEawUG7ePhscdTj0IBrUfZsUNUYZqD8E8XbSWKIuS3SHE+cZ+s/kdAsm4q+FFAlpZKOYGxIkwvgyfu4/Plfol4b7X6iAP9J3r1Kv0DgBVFst5CXEwzZs19/g0CgokQbCXf1N+xeNnUELl6/fImaR3RKP22EaABoil4z8vzl4EqxqVoH1nfhE+WlpryXsuSaF/1R+WklR7aQ1FwoCk8V8HxM2zrj4tI8k=
|
secure: SQC0eCWCWw8bZxbLE8vQn+UjJOp3Z1m779s9SMK3lCLwJxro/VCLBZ7hj4xsrq1MtcFO2U2Kqf068symw4Hr/0amYI3HFTCFiwXAC3PAKXeURca03eNO2heku+FtnQcOjBanExTsIBQRLDXMOaUkf3MIztpLJ4LHqMfUupKmw9YSB0v40jDbSN8khBnndFykmOnVVHznFp8USoN5F0CiPpnfEvHnJkaX76lNf7Kc9XNShBTTtJsnsHMhuYQeInt0vg9HSjoIYC38Tv2hmMj1myNdzyrHF+LgRjI6ceGi50ApAnGepXC/DNRhXROfECKez+LON/ZSqBGdJhUILqC8A4WmWmIjNcwitVFp3JGBqO7LULS0BI96EtSLe8rD1rkkdTbjivajkbykM1Q0Tnmg1adzGwLxRUbTq9tJQlTTkHBCuXIkpKb1mAtb/TY7A6BqfnPi2xTc/++qEawUG7ePhscdTj0IBrUfZsUNUYZqD8E8XbSWKIuS3SHE+cZ+s/kdAsm4q+FFAlpZKOYGxIkwvgyfu4/Plfol4b7X6iAP9J3r1Kv0DgBVFst5CXEwzZs19/g0CgokQbCXf1N+xeNnUELl6/fImaR3RKP22EaABoil4z8vzl4EqxqVoH1nfhE+WlpryXsuSaF/1R+WklR7aQ1FwoCk8V8HxM2zrj4tI8k=
|
||||||
matrix:
|
install: pip install coveralls tox flake8 mypy
|
||||||
fast_finish: true
|
script: tox
|
||||||
include:
|
after_success: coveralls
|
||||||
- python: '2.7'
|
cache:
|
||||||
env: TEST_TYPE=lint
|
directories:
|
||||||
- python: '3.6'
|
- $HOME/.cache/pip
|
||||||
env: TEST_TYPE=mypy
|
- $HOME/.cache/pre-commit
|
||||||
deploy:
|
deploy:
|
||||||
provider: pypi
|
provider: pypi
|
||||||
user: syrusakbary
|
user: syrusakbary
|
||||||
|
|
Loading…
Reference in New Issue
Block a user