Improved Travis for build website automatically

This commit is contained in:
Syrus Akbary 2015-11-25 17:53:52 -08:00
parent 65c9cc7ce8
commit 1345ea873a
2 changed files with 34 additions and 13 deletions

View File

@ -6,8 +6,6 @@ python:
- 3.4
- 3.5
- pypy
node_js:
- 4.1
cache:
directories:
- .cache/pip/
@ -15,17 +13,39 @@ cache:
- docs/node_modules/
- $HOME/docs/node_modules
install:
- pip install --download-cache $HOME/.cache/pip/ pytest pytest-cov coveralls flake8 six
blinker pytest-django
- pip install --download-cache $HOME/.cache/pip/ -e .[django]
- python setup.py develop
- |
if [ "$TEST_TYPE" = build ]; then
pip install --download-cache $HOME/.cache/pip/ pytest pytest-cov coveralls six pytest-django
pip install --download-cache $HOME/.cache/pip/ -e .[django]
python setup.py develop
elif [ "$TEST_TYPE" = lint ]; then
pip install --download-cache $HOME/.cache/pip/ flake8
fi
script:
- py.test --cov=graphene
- flake8
- |
if [ "$TEST_TYPE" = build_website ]; then
echo "Building the web."
nvm install 4.1 && cd docs && npm run deploy
exit
elif [ "$TEST_TYPE" = lint ]; then
echo "Checking Python code lint."
flake8
exit
elif [ "$TEST_TYPE" = build ]; then
py.test --cov=graphene
fi
after_success:
- coveralls
- nvm install 4.1 && cd docs && npm run deploy
- |
if [ "$TEST_TYPE" = build ]; then
coveralls
fi
env:
matrix:
secure: e0iu1FvUcGNcsKEDsGQiGTJZMJ8tJMAQ+c+KCuh7I11likoJbninI9FX85efMglG93Xu4GtND1rUwKWnANM94Cz5IrLrT9ga62Cg1sinbzD+JUOG9EobtmcYcLbfNvA1ybkZf4K0KvkYfH1XUxtL3v6jFI6lLjZ1vKa2M6i5t/38pjgUOOh9KlVGi+rqSp2TUsCyjZkMxE2Wwceen5N/B1yZJDn9yHPA+kiV2ScOMgZOuVMqQd0IAPcjhqTbNdaW2VjNQFtS8CQ8FOjJh9NepRAyA42oII7Aq65YzZbifzYL1eSPKKfUHHdc7Bs+vq1kGuaWz+XBqByZAQvw7OtpkecG+KrcO7XDV38y6z33vg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2.7"
env: TEST_TYPE=lint

View File

@ -19,6 +19,7 @@
"react": "^0.14.3",
"react-document-title": "^2.0.1",
"react-router": "^0.13.5",
"rupture": "^0.6.1",
"stylus-loader": "^1.4.2",
"webpack": "^1.12.9"
}