mirror of
https://github.com/graphql-python/graphene-django.git
synced 2024-11-23 01:57:08 +03:00
Merge pull request #436 from cloudspectatordevelopment/tox
Added tox.ini and improved travis.yml
This commit is contained in:
commit
83cc0d793b
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -78,3 +78,5 @@ Session.vim
|
||||||
*~
|
*~
|
||||||
# auto-generated tag files
|
# auto-generated tag files
|
||||||
tags
|
tags
|
||||||
|
.tox/
|
||||||
|
.pytest_cache/
|
||||||
|
|
88
.travis.yml
88
.travis.yml
|
@ -1,62 +1,60 @@
|
||||||
language: python
|
language: python
|
||||||
sudo: required
|
sudo: required
|
||||||
dist: xenial
|
dist: xenial
|
||||||
|
|
||||||
python:
|
python:
|
||||||
- 2.7
|
- 2.7
|
||||||
- 3.4
|
- 3.4
|
||||||
- 3.5
|
- 3.5
|
||||||
- 3.6
|
- 3.6
|
||||||
- 3.7
|
- 3.7
|
||||||
install:
|
|
||||||
- |
|
|
||||||
if [ "$TEST_TYPE" = build ]; then
|
|
||||||
pip install -e .[test]
|
|
||||||
pip install psycopg2==2.8.2 # Required for Django postgres fields testing
|
|
||||||
pip install django==$DJANGO_VERSION
|
|
||||||
python setup.py develop
|
|
||||||
elif [ "$TEST_TYPE" = lint ]; then
|
|
||||||
pip install flake8==3.7.7
|
|
||||||
fi
|
|
||||||
script:
|
|
||||||
- |
|
|
||||||
if [ "$TEST_TYPE" = lint ]; then
|
|
||||||
echo "Checking Python code lint."
|
|
||||||
flake8 graphene_django
|
|
||||||
exit
|
|
||||||
elif [ "$TEST_TYPE" = build ]; then
|
|
||||||
py.test --cov=graphene_django graphene_django examples
|
|
||||||
fi
|
|
||||||
after_success:
|
|
||||||
- |
|
|
||||||
if [ "$TEST_TYPE" = build ]; then
|
|
||||||
coveralls
|
|
||||||
fi
|
|
||||||
env:
|
env:
|
||||||
matrix:
|
matrix:
|
||||||
- TEST_TYPE=build DJANGO_VERSION=1.11
|
- DJANGO=1.11
|
||||||
|
- DJANGO=2.1
|
||||||
|
- DJANGO=2.2
|
||||||
|
- DJANGO=master
|
||||||
|
|
||||||
|
install:
|
||||||
|
- TOX_ENV=py${TRAVIS_PYTHON_VERSION}-django${DJANGO}
|
||||||
|
- pip install tox
|
||||||
|
- tox -e $TOX_ENV --notest
|
||||||
|
script:
|
||||||
|
- tox -e $TOX_ENV
|
||||||
|
|
||||||
|
after_success:
|
||||||
|
- tox -e $TOX_ENV -- pip install coveralls
|
||||||
|
- tox -e $TOX_ENV -- coveralls $COVERALLS_OPTION
|
||||||
|
|
||||||
matrix:
|
matrix:
|
||||||
fast_finish: true
|
fast_finish: true
|
||||||
include:
|
include:
|
||||||
- python: '3.4'
|
- python: 3.5
|
||||||
env: TEST_TYPE=build DJANGO_VERSION=2.0
|
script: tox -e lint
|
||||||
- python: '3.5'
|
exclude:
|
||||||
env: TEST_TYPE=build DJANGO_VERSION=2.0
|
- python: 2.7
|
||||||
- python: '3.6'
|
env: DJANGO=2.1
|
||||||
env: TEST_TYPE=build DJANGO_VERSION=2.0
|
- python: 2.7
|
||||||
- python: '3.5'
|
env: DJANGO=2.2
|
||||||
env: TEST_TYPE=build DJANGO_VERSION=2.1
|
- python: 2.7
|
||||||
- python: '3.6'
|
env: DJANGO=master
|
||||||
env: TEST_TYPE=build DJANGO_VERSION=2.1
|
- python: 3.4
|
||||||
- python: '3.6'
|
env: DJANGO=2.1
|
||||||
env: TEST_TYPE=build DJANGO_VERSION=2.2
|
- python: 3.4
|
||||||
- python: '3.7'
|
env: DJANGO=2.2
|
||||||
env: TEST_TYPE=build DJANGO_VERSION=2.2
|
- python: 3.4
|
||||||
- python: '2.7'
|
env: DJANGO=master
|
||||||
env: TEST_TYPE=lint
|
- python: 3.5
|
||||||
- python: '3.6'
|
env: DJANGO=master
|
||||||
env: TEST_TYPE=lint
|
- python: 3.7
|
||||||
- python: '3.7'
|
env: DJANGO=1.10
|
||||||
env: TEST_TYPE=lint
|
- python: 3.7
|
||||||
|
env: DJANGO=1.11
|
||||||
|
allow_failures:
|
||||||
|
- python: 3.7
|
||||||
|
- env: DJANGO=master
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
provider: pypi
|
provider: pypi
|
||||||
user: syrusakbary
|
user: syrusakbary
|
||||||
|
|
31
tox.ini
Normal file
31
tox.ini
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
[tox]
|
||||||
|
envlist = py{2.7,3.4,3.5,3.6,3.7,pypy,pypy3}-django{1.10,1.11,2.0,2.1,2.2,master},lint
|
||||||
|
|
||||||
|
[testenv]
|
||||||
|
passenv = *
|
||||||
|
usedevelop = True
|
||||||
|
setenv =
|
||||||
|
DJANGO_SETTINGS_MODULE=django_test_settings
|
||||||
|
basepython =
|
||||||
|
py2.7: python2.7
|
||||||
|
py3.4: python3.4
|
||||||
|
py3.5: python3.5
|
||||||
|
py3.6: python3.6
|
||||||
|
py3.7: python3.7
|
||||||
|
pypypy: pypy
|
||||||
|
pypypy3: pypy3
|
||||||
|
deps =
|
||||||
|
-e.[test]
|
||||||
|
psycopg2
|
||||||
|
django1.10: Django>=1.10,<1.11
|
||||||
|
django1.11: Django>=1.11,<1.12
|
||||||
|
django2.0: Django>=2.0
|
||||||
|
django2.1: Django>=2.1
|
||||||
|
djangomaster: https://github.com/django/django/archive/master.zip
|
||||||
|
commands = {posargs:py.test --cov=graphene_django graphene_django examples}
|
||||||
|
|
||||||
|
[testenv:lint]
|
||||||
|
basepython = python
|
||||||
|
deps =
|
||||||
|
prospector
|
||||||
|
commands = prospector graphene_django -0
|
Loading…
Reference in New Issue
Block a user