forked from xolvio/qualityfaster
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
73 lines (59 loc) · 2.09 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
sudo: false
language: node_js
node_js:
- 5.2.0
env:
global:
MONGO_URL: "mongodb://localhost:27017/meteor"
addons:
apt:
sources:
- google-chrome
packages:
- google-chrome-stable
firefox: "latest"
cache:
directories:
- "$HOME/node_modules"
- "$HOME/.npm"
- "$HOME/mongodb-linux-x86_64-2.6.4"
- "$HOME/.meteor"
- "src/.meteor/local/build"
- "src/.meteor/local/bundler-cache"
- "src/.meteor/local/db"
- "src/.meteor/local/isopacks"
- "src/.meteor/local/plugin-cache"
before_cache:
- rm -rf $HOME/build/xolvio/automated-testing-best-practices/.meteor/local/log
- rm -rf $HOME/build/xolvio/automated-testing-best-practices/.meteor/local/run
before_install:
# Download Meteor
- PATH=$PATH:$HOME/.meteor
- if [ ! -e $HOME/.meteor/meteor ]; then curl -k https://install.meteor.com | sh; fi
# Use X Virtual Frame Buffer
- "/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1027x768x16"
- sleep 3 # give xvfb some time to start
- "export DISPLAY=:99.0"
# Install and start MongoDB 2.6
- export MONGO_PACKAGE=mongodb-linux-x86_64-2.6.4
- export MONGO_HOME=$HOME/$MONGO_PACKAGE
- if [[ ! -e $MONGO_HOME/bin/mongod ]]; then cd $HOME; wget http://downloads.mongodb.org/linux/$MONGO_PACKAGE.tgz && tar xvzf $HOME/$MONGO_PACKAGE.tgz; fi
- export PATH=$MONGO_HOME/bin:$PATH
- mkdir -p $HOME/data/db
- $MONGO_HOME/bin/mongod --dbpath $HOME/data/db > $HOME/mongo.log 2>&1 &
- cd $HOME/build/xolvio/automated-testing-best-practices
# Install NPM dependencies
- npm install
- cd .scripts
# Cache the build and dependencies
- MONGO_URL=mongodb://localhost:27017/cache && ./cache-build-and-dependencies.js
# Cache Selenium & ChromeDriver
- ./node_modules/.bin/chimp --path=features # there are no tests in content
- cd ..
# Cache Karma dependencies
- ./node_modules/.bin/karma start karma.conf.js
# Make sure Mongo has started
- until nc -z localhost 27017 ; do echo Waiting for MongoDB; sleep 1; done
install:
script:
- npm test