From e55aa3bc77f1e970ad8a9982b97fa2469b918fcc Mon Sep 17 00:00:00 2001 From: squidfunk Date: Fri, 24 Feb 2017 20:57:19 +0100 Subject: [PATCH] Polished .travis.yml --- .travis.yml | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/.travis.yml b/.travis.yml index ac173c715..fd46b076f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -43,7 +43,8 @@ cache: - node_modules # Install yarn as Travis doesn't support it out of the box -before_install: npm install -g yarn +before_install: + - curl -o- -L https://yarnpkg.com/install.sh | bash # Install dependencies install: @@ -51,13 +52,14 @@ install: - pip install --user -r requirements.txt # Perform build and tests -script: yarn run build +script: + - yarn run build # ----------------------------------------------------------------------------- # Additional builds # ----------------------------------------------------------------------------- -# Build matrix for additional builds +# Matrix for additional builds matrix: include: @@ -65,11 +67,13 @@ matrix: - node_js: 5 services: - docker + env: + - __TASK=RELEASE # If we're not on a release branch, exit early and indicate success - #before_install: echo "$TRAVIS_BRANCH" | grep -qE "^[0-9.]+$" && exit 0; - # TODO: only for debugging - before_install: TRAVIS_BRANCH_X=1.0.5 + before_install: \ + echo "$TRAVIS_BRANCH" | grep -qvE "^[0-9.]+$" && exit 0; \ + :; # Install wheel for build install: @@ -85,17 +89,15 @@ matrix: # Install twine and push release to PyPI - pip install twine - #- twine upload -u $PYPI_USERNAME -p $PYPI_PASSWORD dist/* + - twine upload -u $PYPI_USERNAME -p $PYPI_PASSWORD dist/* # Push to Docker Hub - docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD - - docker tag $TRAVIS_REPO_SLUG $TRAVIS_REPO_SLUG:$TRAVIS_BRANCH_X + - docker tag $TRAVIS_REPO_SLUG $TRAVIS_REPO_SLUG:$TRAVIS_BRANCH - docker tag $TRAVIS_REPO_SLUG $TRAVIS_REPO_SLUG:latest - docker push $TRAVIS_REPO_SLUG -# Build visual tests separately - temporary disabled until tests are stable -# matrix: -# include: +# # Build visual tests separately - temporary disabled until tests stable # - node_js: 5 # addons: # artifacts: