This repository has been archived by the owner on May 28, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 150
/
.travis.yml
54 lines (54 loc) · 3.04 KB
/
.travis.yml
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
language: node_js
node_js:
- "0.10"
env:
global:
- BIN="node" ISTANBUL=false OPTION="" IOJS_VERSION="v1.0.3" NPM_VERSION="^2.0.0"
- SAUCE_LABS=false
- secure: SHFzZkQEn7wRdNfqVpi/RPRdISS1AYTr5gKTR4wtR1X1x5q/r9Mf1/tXvi2DLuUMl+3O8yuN455229UnwMQiT8ZiDCnq0rTLzZ1nIJJLvMCvvbsMRgJJd+T82JVUA0gZe+AJXbglWo8p6x7TTMVbvwwIbi/yVt0EDaxobFqPGnk=
- secure: kFXfRIg/NQnjIkWAFeLyKQNB9inmfCwbpZiqi3n9K+mKGfjZefWX43tJEPtDw//hQPH0QgEoRx9hQy+4dMuuYzKBIYWuDDwdDYhDpGUaamCCSpjX5jUtG5Rz29tM6t9vU6r369eeR2wcENDP4nEdPtCkr5n7el14no60WGPLNK0=
matrix:
- BIN="node"
- BIN="iojs"
- BIN="phantomjs"
- BIN="narwhal"
- BIN="rhino"
- BIN="rhino" OPTION="-require"
- BIN="ringo"
matrix:
include:
- node_js: "0.8"
env: NPM_VERSION="~1.4.0"
- node_js: '0.10'
env: BIN="node" SAUCE_LABS=true
git:
depth: 10
branches:
only:
- gh-pages
- master
before_install:
- "nvm use $TRAVIS_NODE_VERSION"
- "npm config set loglevel error"
- "npm i -g npm@\"$NPM_VERSION\""
- "[ $SAUCE_LABS == false ] || npm i chalk@\"^0.5.1\" ecstatic@\"^0.5.6\" request@\"^2.34.0\" sauce-tunnel@\"^2.0.0\" lodash@\"^3.5.0\""
# - "[ $BIN == 'istanbul' ] && npm i -g istanbul@\"~0.1.0\" || true"
- "[ $BIN == 'iojs' ] && wget https://iojs.org/dist/${IOJS_VERSION}/iojs-${IOJS_VERSION}-linux-x64.tar.xz && sudo tar xJf iojs-${IOJS_VERSION}-linux-x64.tar.xz -C /opt && rm iojs-${IOJS_VERSION}-linux-x64.tar.xz || true"
- "[ $BIN == 'iojs' ] && sudo ln -s /opt/iojs-${IOJS_VERSION}-linux-x64/bin/iojs /usr/local/bin/iojs && sudo chmod +x /usr/local/bin/iojs || true"
- "[ $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"
- "[ $BIN == 'narwhal' ] && sudo ln -s /opt/narwhal-0.3.2/bin/narwhal /usr/local/bin/narwhal && sudo chmod +x /usr/local/bin/narwhal || true"
- "[ $BIN == 'rhino' ] && wget https://github.com/mozilla/rhino/releases/download/Rhino1_7R5_RELEASE/rhino1_7R5.zip && sudo unzip rhino1_7R5.zip -d /opt && rm rhino1_7R5.zip || true"
- "[ $BIN == 'rhino' ] && echo -e '#!/bin/sh\\njava -jar /opt/rhino1_7R5/js.jar $@' | sudo tee /usr/local/bin/rhino && sudo chmod +x /usr/local/bin/rhino || true"
- "[ $BIN == 'ringo' ] && wget http://ringojs.org/downloads/ringojs-0.9.zip && sudo unzip ringojs-0.9 -d /opt && rm ringojs-0.9.zip || true"
- "[ $BIN == 'ringo' ] && sudo ln -s /opt/ringojs-0.9/bin/ringo /usr/local/bin/ringo && sudo chmod +x /usr/local/bin/ringo || true"
install:
- "npm install"
script:
- "node build.js"
- "cd ./test"
- "$BIN ./test_json3.js"
- "$BIN ./test_json3.js ../lib/json3.min.js"
# - "[ $BIN != 'istanbul' ] || $BIN cover ./test/test_json3.js"
- '[ $SAUCE_LABS == false ] || cd ..'
- '[ $SAUCE_LABS == false ] || $BIN ./test/saucelabs.js name="json3 tests" runner="test/test_browser.html?saucelabs=true" tags="development" framework="custom"'
- '[ $SAUCE_LABS == false ] || $BIN ./test/saucelabs.js name="json3 tests" runner="test/test_browser.html?saucelabs=true&minified=true" tags="minified" framework="custom"'