Restructure install procedure for Travis build

This commit is contained in:
squidfunk 2017-02-24 19:44:04 +01:00 committed by Martin Donath
parent bf439d34b7
commit 43a994245e

View File

@ -45,11 +45,10 @@ cache:
# Install yarn as Travis doesn't support it out of the box # Install yarn as Travis doesn't support it out of the box
before_install: npm install -g yarn before_install: npm install -g yarn
# Do not install optional dependencies by default
install: yarn install --ignore-optional
# Install dependencies # Install dependencies
before_script: pip install --user -r requirements.txt install:
- yarn install --ignore-optional
- pip install --user -r requirements.txt
# Perform build and tests # Perform build and tests
script: yarn run build script: yarn run build
@ -69,12 +68,12 @@ matrix:
# If we're not on a release branch, exit early and indicate success # If we're not on a release branch, exit early and indicate success
#before_install: echo "$TRAVIS_BRANCH" | grep -qE "^[0-9.]+$" && exit 0; #before_install: echo "$TRAVIS_BRANCH" | grep -qE "^[0-9.]+$" && exit 0;
# TODO: only for debugging
# Don't install anything, as we're only using the pre-built files before_install: TRAVIS_BRANCH_X=1.0.5
install: ":"
# Install wheel for build # Install wheel for build
before_script: pip install wheel install:
- pip install wheel
# Perform build # Perform build
script: script:
@ -86,11 +85,11 @@ matrix:
# Install twine and push release to PyPI # Install twine and push release to PyPI
- pip install twine - pip install twine
#- twine upload -u $PYPI_USER -p $PYPI_PASS dist/* #- twine upload -u $PYPI_USERNAME -p $PYPI_PASSWORD dist/*
# Push to Docker Hub # Push to Docker Hub
- docker login -e $DOCKER_EMAIL -u $DOCKER_USERNAME -p $DOCKER_PASSWORD - docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
- docker tag $TRAVIS_REPO_SLUG $TRAVIS_REPO_SLUG:$TRAVIS_BRANCH - docker tag $TRAVIS_REPO_SLUG $TRAVIS_REPO_SLUG:$TRAVIS_BRANCH_X
- docker tag $TRAVIS_REPO_SLUG $TRAVIS_REPO_SLUG:latest - docker tag $TRAVIS_REPO_SLUG $TRAVIS_REPO_SLUG:latest
- docker push $TRAVIS_REPO_SLUG - docker push $TRAVIS_REPO_SLUG