Skip to content

Commit

Permalink
Fix Travis Docker short-circut logic
Browse files Browse the repository at this point in the history
Don't try to be clever with `!` and `||` and `&&`. Instead just
use `travis_terminate` and be okay with the installs happening.

Fixes #1581
  • Loading branch information
strugee committed Apr 17, 2018
1 parent b21188f commit bc02058
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,20 @@ addons:
services:
- docker
script:
- "./util/docker-candidacy.sh && (npm test || npm test) && sudo sh -c 'export PATH=\"'\"$(dirname $(which node)):$PATH\"'\" && npm run test:root && npm run test:install'"
- if ./util/docker-candidacy.sh; then export DOCKER_CANDIDATE=true; else export DOCKER_CANDIDATE=false; fi
- if $DOCKER_CANDIDATE; then ./utils/build-docker.sh; fi
# We don't use build-docker && travis_terminate or anything like that because then a failure in build-docker.sh wouldn't fail the build
- if $DOCKER_CANDIDATE; then travis_terminate; fi
- "(npm test || npm test) && sudo sh -c 'export PATH=\"'\"$(dirname $(which node)):$PATH\"'\" && npm run test:root && npm run test:install'"
before_script:
- "./test/hosts.sh"
before_install:
- ./util/docker-candidacy.sh && sudo apt-get update -qq
- ./util/docker-candidacy.sh && sudo apt-get install -qq graphicsmagick
- ./util/docker-candidacy.sh && npm install -g npm@5
- sudo apt-get update -qq
- sudo apt-get install -qq graphicsmagick
- npm install -g npm@5
after_script:
# We need sudo because the coverage data from as-root tests is root:root but not world-readable
- "./util/docker-candidacy.sh && sudo sh -c 'export PATH=\"'\"$(dirname $(which node)):$PATH\"'\" && npm run test:report-coverage'"
- "sudo sh -c 'export PATH=\"'\"$(dirname $(which node)):$PATH\"'\" && npm run test:report-coverage'"
notifications:
email: false
webhooks:
Expand Down

0 comments on commit bc02058

Please sign in to comment.