forked from Automattic/wp-e2e-tests
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run-wrapper.sh
executable file
·30 lines (24 loc) · 930 Bytes
/
run-wrapper.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/bash
# Notify Slack if any tests are being skipped -- Only runs on Node 0 so you just get one ping
# -- Note that since this is called before run.sh the BROWSERSIZE variable is not yet set and
# it will always say "screen size 'desktop'"
if [ "$CIRCLE_NODE_INDEX" == "0" ]; then
if [ "$SKIP_TEST_REGEX" != "" ]; then
babel-node --presets es2015 lib/slack-ping-cli.js "Attention! Tests are being skipped with pattern [$SKIP_TEST_REGEX]"
fi
fi
if [ "$NODE_ENV_OVERRIDE" != "" ]; then
NODE_ENV=$NODE_ENV_OVERRIDE
fi
export TESTARGS="-R -p"
if [ "$RUN_SPECIFIED" == "true" ]; then
TESTARGS=$RUN_ARGS
elif [[ "$CIRCLE_BRANCH" =~ .*[Jj]etpack.*|.*[Jj][Pp].* ]]; then
TESTARGS="-R -j" # Execute Jetpack tests
elif [ "$CIRCLE_BRANCH" == "master" ]; then
TESTARGS="-R -p" # Parallel execution, implies -g -s mobile,desktop
fi
if [ "$liveBranches" == "true" ]; then
TESTARGS+=" -b $branchName"
fi
npm test