Files
talk/scripts/e2e-ci.sh
T
2017-10-18 23:17:14 +07:00

36 lines
821 B
Bash
Executable File
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/bin/bash
if [[ "${CIRCLE_BRANCH}" == "master" ]]; then
exitCode=0
browserstack() {
REPORTS_FOLDER="$CIRCLE_TEST_REPORTS/$1" yarn e2e-browserstack -- --env "$1"
# Determine exit code.
result=$?
if [ "$result" -gt "0" ]
then
exitCode=$result
fi
# Sleep a bit to let browserstack-local to close properly.
sleep 2
}
# Test using browserstack.
browserstack chrome
browserstack firefox
# browserstack safari Safari >= 8 has issues connecting to browserstack-local. Safari < 8 is too old.
browserstack ie
browserstack edge
exit $exitCode
else
# When browserstack is not available test locally using chrome headless.
REPORTS_FOLDER="$CIRCLE_TEST_REPORTS/chrome" yarn e2e -- --env chrome-headless
# Will exit with status of last command.
exit $?
fi