forked from ionic-team/ionic-framework
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.sh
More file actions
executable file
·60 lines (53 loc) · 1.35 KB
/
test.sh
File metadata and controls
executable file
·60 lines (53 loc) · 1.35 KB
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/bin/bash
ARG_DEFS=(
"--index=(.*)"
"--total=(.*)"
)
function init {
# Global Variables
export SAUCE_TUNNEL_ID=${CIRCLE_BUILD_NUM:-$RANDOM}-$CIRCLE_NODE_INDEX
export SAUCE_BUILD_ID=${CIRCLE_SHA1:-$RANDOM}
}
function run {
cd ../..
if [[ "$(git symbolic-ref --short HEAD)" == "master" ]]; then
IS_MASTER=true
fi
node_modules/.bin/gulp demos --demo-version=nightly
TEST_ID=$CIRCLE_SHA1-$CIRCLE_BUILD_NUM
case $INDEX in
0)
[ -z $IS_MASTER ] || node_modules/.bin/gulp ddescribe-iit
node_modules/.bin/gulp jshint
node_modules/.bin/gulp karma --browsers=PhantomJS --reporters=dots
;;
1)
# node_modules/.bin/gulp snapshot-sauce \
# --browser="chrome" \
# --params.width="400" \
# --params.height="800" \
# --params.test_id=$TEST_ID
# --params.platform_id="chrome_desktop_small" \
# --params.platform_index=$INDEX \
# --params.platform_count=$TOTAL
;;
2)
# node_modules/.bin/gulp snapshot-sauce \
# --browser="safari" \
# --platform="OS X 10.9"
# --params.width="400" \
# --params.height="800" \
# --params.test_id=$TEST_ID \
# --params.platform_id="safari_desktop_small" \
# --params.platform_index=$INDEX \
# --params.platform_count=$TOTAL
;;
3)
;;
4)
;;
5)
;;
esac
}
source $(dirname $0)/../utils.inc