Skip to content
This repository was archived by the owner on May 28, 2019. It is now read-only.

Commit 85c9ca5

Browse files
committed
Add Sauce Labs automated testing
1 parent cf2a64b commit 85c9ca5

File tree

3 files changed

+974
-15
lines changed

3 files changed

+974
-15
lines changed

.travis.yml

Lines changed: 25 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,31 @@ node_js:
44
- "0.10"
55
env:
66
matrix:
7-
- BIN="node"
8-
- BIN="phantomjs"
7+
- BIN="node"
8+
- BIN="phantomjs"
9+
global:
10+
- SAUCE_LABS=false
11+
- secure: SHFzZkQEn7wRdNfqVpi/RPRdISS1AYTr5gKTR4wtR1X1x5q/r9Mf1/tXvi2DLuUMl+3O8yuN455229UnwMQiT8ZiDCnq0rTLzZ1nIJJLvMCvvbsMRgJJd+T82JVUA0gZe+AJXbglWo8p6x7TTMVbvwwIbi/yVt0EDaxobFqPGnk=
12+
- secure: kFXfRIg/NQnjIkWAFeLyKQNB9inmfCwbpZiqi3n9K+mKGfjZefWX43tJEPtDw//hQPH0QgEoRx9hQy+4dMuuYzKBIYWuDDwdDYhDpGUaamCCSpjX5jUtG5Rz29tM6t9vU6r369eeR2wcENDP4nEdPtCkr5n7el14no60WGPLNK0=
913
matrix:
1014
include:
11-
- node_js: "0.10"
12-
env: BIN="narwhal"
13-
- node_js: "0.10"
14-
env: BIN="rhino"
15-
- node_js: "0.10"
16-
env: BIN="ringo"
15+
- node_js: '0.10'
16+
env: BIN="narwhal"
17+
- node_js: '0.10'
18+
env: BIN="rhino"
19+
- node_js: '0.10'
20+
env: BIN="ringo"
21+
- node_js: '0.10'
22+
env: BIN="node" SAUCE_LABS=true
1723
git:
1824
depth: 10
1925
branches:
2026
only:
21-
- gh-pages
22-
- dev
27+
- gh-pages
28+
- dev
2329
before_install:
2430
- "npm install npm -g"
31+
- "[ $SAUCE_LABS == false ] || npm i chalk@\"^0.5.1\" ecstatic@\"^0.5.6\" request@\"^2.34.0\" sauce-tunnel@\"^2.0.0\" lodash@\"git://github.com/lodash/lodash.git#dd27014b09ef620975391b49eaac8fa7e9597df5\""
2532
- "[ $BIN == 'istanbul' ] && npm i -g istanbul@\"~0.1.0\" || true"
2633
- "[ $BIN == 'narwhal' ] && wget https://github.com/280north/narwhal/archive/v0.3.2.zip && sudo unzip v0.3.2 -d /opt/ && rm v0.3.2.zip || true"
2734
- "[ $BIN == 'narwhal' ] && sudo ln -s /opt/narwhal-0.3.2/bin/narwhal /usr/local/bin/narwhal && sudo chmod +x /usr/local/bin/narwhal || true"
@@ -32,8 +39,11 @@ before_install:
3239
install:
3340
- "npm install"
3441
script:
35-
- "[ $BIN != 'istanbul' ] || $BIN cover ./test/test_json3.js"
36-
- "[ $BIN == 'istanbul' ] || node build.js"
37-
- "[ $BIN == 'istanbul' ] || cd ./test"
38-
- "[ $BIN == 'istanbul' ] || $BIN ./test_json3.js"
39-
- "[ $BIN == 'istanbul' ] || $BIN ./test_json3.js ../lib/json3.min.js"
42+
- '[ $BIN != ''istanbul'' ] || $BIN cover ./test/test_json3.js'
43+
- '[ $BIN == ''istanbul'' ] || node build.js'
44+
- '[ $BIN == ''istanbul'' ] || cd ./test'
45+
- '([ $BIN == ''istanbul'' ] && [ $SAUCE_LABS == true ]) || $BIN ./test_json3.js'
46+
- '([ $BIN == ''istanbul'' ] && [ $SAUCE_LABS == true ]) || $BIN ./test_json3.js ../lib/json3.min.js'
47+
- '[ $SAUCE_LABS == false ] || cd ..'
48+
- '[ $SAUCE_LABS == false ] || $BIN ./test/saucelabs.js name="json3 tests" runner="test/test_browser.html?saucelabs=true" tags="development" framework="custom"'
49+
- '[ $SAUCE_LABS == false ] || $BIN ./test/saucelabs.js name="json3 tests" runner="test/test_browser.html?saucelabs=true&minified=true" tags="minified" framework="custom"'

0 commit comments

Comments
 (0)