mirror of
https://github.com/graphql-python/graphene.git
synced 2025-02-02 12:44:15 +03:00
Added before install to travis for stopping build if only docs changed
This commit is contained in:
parent
e55d230faf
commit
2574ee2976
27
.travis.yml
27
.travis.yml
|
@ -12,19 +12,27 @@ cache:
|
|||
- $HOME/.cache/pip
|
||||
- docs/node_modules/
|
||||
- $HOME/docs/node_modules
|
||||
- $(npm config get prefix)/bin/gatsby
|
||||
before_install:
|
||||
- |
|
||||
if [ "$TEST_TYPE" != build_website ] && \
|
||||
! git diff --name-only $TRAVIS_COMMIT_RANGE | grep -qvE '(\.md$)|(^(docs))/'
|
||||
then
|
||||
echo "Only docs were updated, stopping build process."
|
||||
exit
|
||||
fi
|
||||
install:
|
||||
- |
|
||||
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
|
||||
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
|
||||
pip install --download-cache $HOME/.cache/pip/ flake8
|
||||
fi
|
||||
script:
|
||||
- |
|
||||
if [ "$TEST_TYPE" = build_website ]; then
|
||||
if [ "$TRAVIS_BRANCH" = "docs" ] && [ "$TRAVIS_PULL_REQUEST" = false ]; then
|
||||
echo "Building the web."
|
||||
nvm install 4.0
|
||||
|
||||
|
@ -44,12 +52,13 @@ script:
|
|||
git push "https://${GITHUB_TOKEN}@github.com/graphql-python/graphene.git" gh-pages-seg
|
||||
fi
|
||||
exit
|
||||
fi
|
||||
elif [ "$TEST_TYPE" = lint ]; then
|
||||
echo "Checking Python code lint."
|
||||
flake8
|
||||
exit
|
||||
echo "Checking Python code lint."
|
||||
flake8
|
||||
exit
|
||||
elif [ "$TEST_TYPE" = build ]; then
|
||||
py.test --cov=graphene
|
||||
py.test --cov=graphene
|
||||
fi
|
||||
after_success:
|
||||
- |
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
"main": "n/a",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"build": "npm install -g gatsby && npm install && gatsby build",
|
||||
"build": "npm install && ./node_modules/.bin/gatsby build",
|
||||
"deploy": "npm run build"
|
||||
},
|
||||
"keywords": [
|
||||
|
@ -15,6 +15,7 @@
|
|||
"dependencies": {
|
||||
"copy-webpack-plugin": "^0.2.0",
|
||||
"extract-text-webpack-plugin": "^0.9.1",
|
||||
"gatsby": "^0.7.2",
|
||||
"jeet": "^6.1.2",
|
||||
"lodash": "^3.10.1",
|
||||
"nib": "^1.1.0",
|
||||
|
|
|
@ -6,7 +6,6 @@ if (IN_BROWSER) {
|
|||
navigator.userAgent && !navigator.userAgent.match('CriOS');
|
||||
var browser_supported = !isSafari;
|
||||
}
|
||||
console.log(browser_supported);
|
||||
if (IN_BROWSER && browser_supported) {
|
||||
var glfx = require('../vendor/glfx.optim')
|
||||
var particlesJS = require('../vendor/particles.js')
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
// React patched version for render in server side always with same ids
|
||||
if (typeof window === "undefined") {
|
||||
var ServerReactRootIndex = require('react/lib/ServerReactRootIndex');
|
||||
console.log(ServerReactRootIndex);
|
||||
ServerReactRootIndex.createReactRootIndex = function(){
|
||||
return "graphene";
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue
Block a user