This repository was archived by the owner on Sep 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Expand file tree
/
Copy pathtest-versions.sh
More file actions
executable file
·76 lines (58 loc) · 2.09 KB
/
test-versions.sh
File metadata and controls
executable file
·76 lines (58 loc) · 2.09 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#!/bin/bash
# The purpose of this file is to download
# assigned AngularJS source files and test
# them against this build of AngularJS Material using Jenkins.
# This works by pulling in all of the tags
# from AngularJS, finding the highest version
# numbers for each branch (e.g. 1.5 => 1.5.X where
# X is the highest patch release). For each
# detected version it will then copy over each
# of the source files to the node_modules/angular-X
# folder and then run `gulp karma` to see if
# they pass. If there are one or more failed tests
# then this script will propagate a failed exit code.
# [INPUT]
# just run `./scripts/test-versions.sh`
# [OUTPUT]
# an exit code of "0" (passing) or "1" (failing)
# [CONFIG VALUES]
# Available Options are: 1.X, 1.X.X, 1.X.X-(beta|rc).X or snapshot
VERSIONS=(1.5 1.6 1.7 snapshot)
BROWSERS="Chrome"
#
# DO NOT EDIT PAST THIS LINE
#
FAILED=false
if [ ${#VERSIONS[@]} == 0 ]; then
echo "Error: please specify one or more versions of AngularJS to test..."
exit 1
fi;
for VERSION in "${VERSIONS[@]}"; do
echo "######################################################################"
echo "####### Jenkins Build #######"
echo "####### Testing AngularJS Material + AngularJS (${VERSION}) #######"
echo "######################################################################"
./scripts/fetch-angular-version.sh $VERSION
echo "\n"
pwd
node ./node_modules/gulp/bin/gulp.js karma --config=config/karma-jenkins.conf.js --reporters='dots' --browsers=$BROWSERS
LAST_EXIT_CODE=$?
echo "\n"
echo "......................................................................"
echo "....... Finished: ngM1 + AngularJS (${VERSION}) ............."
echo "......................................................................"
echo "\n"
if [ $LAST_EXIT_CODE != "0" ]; then
echo "STATUS: FAILED"
FAILED=true
else
echo "STATUS: SUCCESS"
fi
echo "\n\n"
done
if [ $FAILED == true ]; then
echo "Error: One or more of the karma tests have failed..."
exit 1
else
echo "All tests have passed successfully..."
fi