From 05144487ce3ad4ee32afb530362b676b763ac734 Mon Sep 17 00:00:00 2001 From: Syrus Akbary Date: Sat, 6 Aug 2016 19:28:09 -0700 Subject: [PATCH] Fixed travis --- .gitignore | 1 + .travis.yml | 52 ++++++---------------------------------------------- 2 files changed, 7 insertions(+), 46 deletions(-) diff --git a/.gitignore b/.gitignore index 5b7b0767..b7554723 100644 --- a/.gitignore +++ b/.gitignore @@ -78,3 +78,4 @@ target/ # Databases *.sqlite3 +.vscode diff --git a/.travis.yml b/.travis.yml index e29e9cbf..897bb736 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,62 +9,24 @@ cache: directories: - .cache/pip/ - $HOME/.cache/pip - - docs/node_modules/ - - $HOME/docs/node_modules -before_install: -- | - git_diff=$(git diff --name-only $TRAVIS_COMMIT_RANGE) - if [ "$?" == 0 ] && [ "$TEST_TYPE" != build_website ] && \ - ! echo "$git_diff" | 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 - pip install --download-cache $HOME/.cache/pip psycopg2 > /dev/null 2>&1 - pip install --download-cache $HOME/.cache/pip/ -e . - python setup.py develop - elif [ "$TEST_TYPE" = build_website ]; then - pip install --download-cache $HOME/.cache/pip/ -e . + pip install pytest pytest-cov coveralls six + pip install psycopg2 > /dev/null 2>&1 + pip install -e . python setup.py develop elif [ "$TEST_TYPE" = lint ]; then - pip install --download-cache $HOME/.cache/pip/ flake8 + pip install flake8 fi script: - | - if [ "$TEST_TYPE" = build_website ]; then - if [ "$TRAVIS_BRANCH" = "master" ] && [ "$TRAVIS_PULL_REQUEST" = false ]; then - echo "Building the web." - nvm install 4.0 - - GH_PAGES_DIR="$TRAVIS_BUILD_DIR"/docs/public - git config --global user.name "Travis CI" - git config --global user.email "travis@graphene-python.org" - git clone --branch gh-pages --depth=50 \ - https://graphql-python-bot@github.com/graphql-python/graphene.git \ - $GH_PAGES_DIR - cd docs - ./playground/graphene-js/build.sh - npm run deploy - cd $GH_PAGES_DIR - git status - git add --intent-to-add . - if ! git diff-index --quiet HEAD --; then - git add -A . - git commit -m "Rebuild website" - git push "https://${GITHUB_TOKEN}@github.com/graphql-python/graphene.git" gh-pages - fi - exit - fi - elif [ "$TEST_TYPE" = lint ]; then + if [ "$TEST_TYPE" = lint ]; then echo "Checking Python code lint." flake8 exit elif [ "$TEST_TYPE" = build ]; then - py.test graphene examples --cov=graphene + py.test --cov=graphene fi after_success: - | @@ -79,7 +41,5 @@ env: matrix: fast_finish: true include: - - python: '2.7' - env: TEST_TYPE=build_website - python: '2.7' env: TEST_TYPE=lint