Skip to content
This repository was archived by the owner on Apr 11, 2024. It is now read-only.

Commit c51e721

Browse files
committed
Use yarn.
1 parent c7946f4 commit c51e721

File tree

2 files changed

+819
-12
lines changed

2 files changed

+819
-12
lines changed

.travis.yml

Lines changed: 45 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,66 @@
11
language: node_js
22
sudo: false
33
node_js:
4-
- "6"
4+
- 6
5+
56
cache:
67
directories:
78
- $HOME/.npm
9+
- $HOME/.yarn-cache
10+
- travis_phantomjs
11+
812
env:
913
global:
10-
- BIN="node" ISTANBUL=false
11-
- secure: "XOINlYZG3DYXq5agQXvkad2MfnOO/+z40fn37RKfNuxNI5veBK7tPRcCIQ998o+NyVTpyd3NZhqkowCxAL8bp4HJ81SesRKQSaXoSzgV7CnloxLxcduiiRJ6lnxFGgCbpqyLxZHWr0mQugcLhs5nhiZ5Dnw6dZxYX/oKKvOomZA="
14+
- BIN=node ISTANBUL=false
15+
- secure: XOINlYZG3DYXq5agQXvkad2MfnOO/+z40fn37RKfNuxNI5veBK7tPRcCIQ998o+NyVTpyd3NZhqkowCxAL8bp4HJ81SesRKQSaXoSzgV7CnloxLxcduiiRJ6lnxFGgCbpqyLxZHWr0mQugcLhs5nhiZ5Dnw6dZxYX/oKKvOomZA=
1216
matrix:
1317
-
1418
- ISTANBUL=true
15-
- BIN="phantomjs"
19+
- BIN=phantomjs
20+
1621
matrix:
1722
include:
18-
- node_js: "4"
23+
- node_js: 4
1924
env:
25+
2026
git:
2127
depth: 10
28+
2229
branches:
2330
only:
2431
- master
32+
2533
before_install:
26-
- "nvm use $TRAVIS_NODE_VERSION"
27-
- "npm set loglevel error"
28-
- "npm set progress false"
29-
- "npm i -g npm@\"^2.0.0\""
34+
# Upgrade PhantomJS.
35+
- |
36+
export PHANTOMJS_VERSION=2.1.1
37+
export PATH=$PWD/travis_phantomjs/phantomjs-$PHANTOMJS_VERSION-linux-x86_64/bin:$PATH
38+
if [ $(phantomjs --version) != $PHANTOMJS_VERSION ]; then
39+
rm -rf $PWD/travis_phantomjs
40+
mkdir -p $PWD/travis_phantomjs
41+
wget https://github.com/Medium/phantomjs/releases/download/v$PHANTOMJS_VERSION/phantomjs-$PHANTOMJS_VERSION-linux-x86_64.tar.bz2
42+
tar -xvf phantomjs-$PHANTOMJS_VERSION-linux-x86_64.tar.bz2 -C $PWD/travis_phantomjs
43+
fi
44+
phantomjs -v
45+
46+
# Use exact Node version.
47+
- nvm use $TRAVIS_NODE_VERSION
48+
49+
# Setup package managers.
50+
- npm set loglevel error
51+
- npm set progress false
52+
- npm i -g yarn
53+
- yarn -V
54+
55+
install:
56+
# Install packages.
57+
- yarn
58+
3059
script:
31-
- "[ $ISTANBUL == false ] || (istanbul cover -x \"**/vendor/**\" --report lcovonly ./test/test.js && cat ./coverage/lcov.info | coveralls && rm -rf ./coverage) || true"
32-
- "[ $ISTANBUL == true ] || cd ./test"
33-
- "[ $ISTANBUL == true ] || $BIN ./test.js"
60+
- |
61+
if [ $ISTANBUL = true ]; then
62+
istanbul cover -x "**/vendor/**" --report lcovonly ./test/test.js && cat ./coverage/lcov.info | coveralls && rm -rf ./coverage
63+
else
64+
cd ./test
65+
$BIN ./test.js
66+
fi

0 commit comments

Comments
 (0)