2015-09-24 12:11:50 +03:00
|
|
|
language: python
|
|
|
|
sudo: false
|
|
|
|
python:
|
|
|
|
- 2.7
|
2015-10-06 08:59:23 +03:00
|
|
|
- 3.4
|
|
|
|
- 3.5
|
|
|
|
- pypy
|
2016-08-07 05:45:11 +03:00
|
|
|
before_install:
|
|
|
|
- |
|
|
|
|
if [ "$TRAVIS_PYTHON_VERSION" = "pypy" ]; then
|
|
|
|
export PYENV_ROOT="$HOME/.pyenv"
|
|
|
|
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
|
2015-09-24 12:11:50 +03:00
|
|
|
install:
|
2015-11-26 04:53:52 +03:00
|
|
|
- |
|
2015-11-26 05:35:13 +03:00
|
|
|
if [ "$TEST_TYPE" = build ]; then
|
2016-08-18 07:26:05 +03:00
|
|
|
pip install pytest pytest-cov pytest-benchmark coveralls six
|
2016-08-07 05:28:09 +03:00
|
|
|
pip install -e .
|
2015-11-28 12:56:36 +03:00
|
|
|
python setup.py develop
|
2015-11-26 05:35:13 +03:00
|
|
|
elif [ "$TEST_TYPE" = lint ]; then
|
2016-08-07 05:28:09 +03:00
|
|
|
pip install flake8
|
2015-11-26 05:35:13 +03:00
|
|
|
fi
|
2015-09-24 12:11:50 +03:00
|
|
|
script:
|
2015-11-26 04:53:52 +03:00
|
|
|
- |
|
2016-08-07 05:28:09 +03:00
|
|
|
if [ "$TEST_TYPE" = lint ]; then
|
2015-11-26 08:00:13 +03:00
|
|
|
echo "Checking Python code lint."
|
2016-08-07 05:42:06 +03:00
|
|
|
flake8 graphene
|
2015-11-26 08:00:13 +03:00
|
|
|
exit
|
2015-11-26 05:35:13 +03:00
|
|
|
elif [ "$TEST_TYPE" = build ]; then
|
2016-08-07 05:42:06 +03:00
|
|
|
py.test --cov=graphene graphene examples
|
2015-11-26 05:35:13 +03:00
|
|
|
fi
|
2015-09-24 12:11:50 +03:00
|
|
|
after_success:
|
2015-11-26 04:53:52 +03:00
|
|
|
- |
|
2015-11-26 05:35:13 +03:00
|
|
|
if [ "$TEST_TYPE" = build ]; then
|
|
|
|
coveralls
|
|
|
|
fi
|
2015-11-21 21:33:29 +03:00
|
|
|
env:
|
2015-11-26 05:35:13 +03:00
|
|
|
matrix:
|
2015-12-12 11:40:26 +03:00
|
|
|
- TEST_TYPE=build
|
2015-11-26 05:35:13 +03:00
|
|
|
global:
|
|
|
|
secure: SQC0eCWCWw8bZxbLE8vQn+UjJOp3Z1m779s9SMK3lCLwJxro/VCLBZ7hj4xsrq1MtcFO2U2Kqf068symw4Hr/0amYI3HFTCFiwXAC3PAKXeURca03eNO2heku+FtnQcOjBanExTsIBQRLDXMOaUkf3MIztpLJ4LHqMfUupKmw9YSB0v40jDbSN8khBnndFykmOnVVHznFp8USoN5F0CiPpnfEvHnJkaX76lNf7Kc9XNShBTTtJsnsHMhuYQeInt0vg9HSjoIYC38Tv2hmMj1myNdzyrHF+LgRjI6ceGi50ApAnGepXC/DNRhXROfECKez+LON/ZSqBGdJhUILqC8A4WmWmIjNcwitVFp3JGBqO7LULS0BI96EtSLe8rD1rkkdTbjivajkbykM1Q0Tnmg1adzGwLxRUbTq9tJQlTTkHBCuXIkpKb1mAtb/TY7A6BqfnPi2xTc/++qEawUG7ePhscdTj0IBrUfZsUNUYZqD8E8XbSWKIuS3SHE+cZ+s/kdAsm4q+FFAlpZKOYGxIkwvgyfu4/Plfol4b7X6iAP9J3r1Kv0DgBVFst5CXEwzZs19/g0CgokQbCXf1N+xeNnUELl6/fImaR3RKP22EaABoil4z8vzl4EqxqVoH1nfhE+WlpryXsuSaF/1R+WklR7aQ1FwoCk8V8HxM2zrj4tI8k=
|
2015-11-26 04:53:52 +03:00
|
|
|
matrix:
|
|
|
|
fast_finish: true
|
|
|
|
include:
|
2015-11-26 05:35:13 +03:00
|
|
|
- python: '2.7'
|
|
|
|
env: TEST_TYPE=lint
|