-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathtest.sh
executable file
·50 lines (41 loc) · 1.1 KB
/
test.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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/bin/bash
#
# runs all build checks which should be tested as part of CI build.
#
set -e;
# lint
# ====
if [[ $@ != **skip-linting** ]]; then
echo; echo "linting files...";
find js -name *.coffee | xargs ./node_modules/coffeelint/bin/coffeelint;
fi
if [[ $@ != **skip-checks** ]]; then
# commit hooks
# ============
echo; echo "running commit hooks..."
./commit-hooks.rb;
# unused imports
# ==============
echo; echo "checking for unused imports..."
./check-unused-imports.rb;
fi
# r.js build
# ==========
echo; echo "building kryptnostic.js...";
./build.sh;
# karma unit tests
# ===========
echo; echo "running unit tests...";
node_modules/karma-cli/bin/karma start js/karma.conf.js --single-run true;
# karma browser tests
# ===================
echo; echo "running browser-only tests...";
echo; echo "TEMPORARY - inlining KryptnosticClient.js into KarmaJS context.html...";
cp karmajs-kcjs-context.html node_modules/karma/static/context.html;
echo;
node_modules/karma-cli/bin/karma start js/karma-browser-only.conf.js --single-run true;
# output
# ======
echo "ALL TESTS PASSED!";
echo ":)";
echo;