Allow disabling e2e in ci

This commit is contained in:
Chi Vinh Le
2017-12-19 16:14:59 +01:00
parent d06ff8c93c
commit e4f1f5d08b
+7
View File
@@ -2,6 +2,7 @@
REPORTS_FOLDER=${CIRCLE_TEST_REPORTS:-./test/e2e/reports}
CIRCLE_BRANCH=${CIRCLE_BRANCH:-master}
E2E_DISABLE=${E2E_DISABLE:-false}
# Amount of retries before failure.
E2E_MAX_RETRIES=${E2E_MAX_RETRIES:-1}
@@ -14,6 +15,12 @@ E2E_WAIT_FOR_TIMEOUT=${E2E_WAIT_FOR_TIMEOUT:-5000}
E2E_BROWSERS=${E2E_BROWSERS:-chrome,firefox,edge} #ie safari
if [[ "${E2E_DISABLE}" == "true" ]]; then
echo E2E is disabled.
exit
fi
if [[ "${CIRCLE_BRANCH}" == "master" && -n "$BROWSERSTACK_KEY" ]]; then
echo Testing on browserstack
yarn e2e --reports-folder "$REPORTS_FOLDER" --bs-key "$BROWSERSTACK_KEY" --retries "$E2E_MAX_RETRIES" --timeout "$E2E_WAIT_FOR_TIMEOUT" --browsers "$E2E_BROWSERS"