From 211c02c7de8ef90b95829bf422f057f464546e62 Mon Sep 17 00:00:00 2001 From: Laurent Cozic Date: Mon, 11 Nov 2019 08:22:31 +0000 Subject: [PATCH] Disable test units when releasing version --- .travis.yml | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3e5152d08..25185c118 100644 --- a/.travis.yml +++ b/.travis.yml @@ -60,15 +60,19 @@ script: npm install cd .. - # Run test units - cd CliClient - npm install - ./run_test.sh - testResult=$? - if [ $testResult -ne 0 ]; then - exit $testResult + # Run test units. + # Only do it for pull requests because Travis randomly fails to run them + # and that would break the desktop release. + if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then + cd CliClient + npm install + ./run_test.sh + testResult=$? + if [ $testResult -ne 0 ]; then + exit $testResult + fi + cd .. fi - cd .. # Run linter for pull requests only - this is so that # bypassing eslint is allowed for urgent fixes.