Skip to content

Commit

Permalink
Merge pull request #149 from wordpress-mobile/feature/travis-option-t…
Browse files Browse the repository at this point in the history
…o-run-inside-gb-tests

Add option for Travis to run tests with GB as parent
  • Loading branch information
hypest authored Sep 19, 2018
2 parents e3c65b0 + 6711c1e commit 776bb23
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions .travis/travis-checks-js.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,18 @@ if [ "$CHECK_CORRECTNESS" = true ] ; then
npm run lint || pFail
fi

if [ "$GUTENBERG_AS_PARENT" = true ] ; then
TEST_SCRIPT_NAME='test:inside-gb'
else
TEST_SCRIPT_NAME='test'
fi

if [ "$CHECK_TESTS" = true ] ; then
# we'll run the tests twich (once for each platform) if the platform env var is not set
if [[ -z "${TEST_RN_PLATFORM}" ]] ; then
TEST_RN_PLATFORM=android npm test || pFail
TEST_RN_PLATFORM=ios npm test || pFail
TEST_RN_PLATFORM=android npm run ${TEST_SCRIPT_NAME} || pFail
TEST_RN_PLATFORM=ios npm run ${TEST_SCRIPT_NAME} || pFail
else
npm test || pFail
npm run ${TEST_SCRIPT_NAME} || pFail
fi
fi

0 comments on commit 776bb23

Please sign in to comment.