Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

Commit

Permalink
chore(travis): travis cache phantomjs2 binary.
Browse files Browse the repository at this point in the history
Closes #7562

# Conflicts:
#	.travis.yml
  • Loading branch information
devversion authored and ThomasBurleson committed Apr 1, 2016
1 parent f08cc70 commit 81b0b8b
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 19 deletions.
48 changes: 29 additions & 19 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,38 @@
sudo: false
language: node_js
sudo: false
node_js:
- '4.2.3'
- 4.2.3
env:
global:
secure: TWmpBzRG68b9e5wbJ7I6ox8TrZTnU/XpOkBvggJyuMgvUz27accp92Y9U7DWUPiXYXcWnoc7pqVAvEbwd1/ykHKCqezmyEXsrzZo6POg2lNFXkI9vSuDukL8A4Ct9zANVmr+5Y+kEBtQ/viyO5Rxc5H9bZskSeMaegqR60ZT2E8=

- LOGS_DIR=/tmp/angular-material1-build/logs
- SAUCE_USERNAME=angular-ci
- SAUCE_ACCESS_KEY=9b988f434ff8-fbca-8aa4-4ae3-35442987
- BROWSER_STACK_USERNAME=angularteam1
- BROWSER_STACK_ACCESS_KEY=BWCd4SynLzdDcv8xtzsB
- secure: X7CNmOMemAJ9Jqrsmv6MXyeh8n8TIL5CKzE9LYsZUbsyKo0l5CyyysJq0y/AbpQS6awsSv2qP/cZ/kand6r6z0wMFbUcxa4HjMZEfRwv3sGtwj1OKJko/GvjcZQzD54FtHy1NU7wR0mYhAlE5IwH7f8bMa/nUiijgD/TOCTtKH8=
cache:
directories:
- node_modules
- "$HOME/.pub-cache"
- "$HOME/travis-phantomjs"
branches:
only:
- master

- master
before_install:
- "source ./scripts/travis-install-phantomjs2.sh"
install:
- npm install
- npm rebuild node-sass
before_script:
- export DISPLAY=:99.0 # firefox virtual screen
- sh -e /etc/init.d/xvfb start # firefox virtual screen
- git config --global user.email "ngmaterial@googlegroups.com"
- git config --global user.name "ngMaterial Bot"

# Necessary to run test on Travis CI that require a graphical interface.
# See https://docs.travis-ci.com/user/gui-and-headless-browsers
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
- mkdir -p $LOGS_DIR
- git config --global user.email "ngmaterial@googlegroups.com"
- git config --global user.name "ngMaterial Bot"
script:
# Fail builds which use iit/ddescribe, but run the tests anyways
- gulp ddescribe-iit
- gulp karma --reporters='dots'

- gulp ddescribe-iit
- gulp karma --reporters='dots'
after_success:
- ./scripts/travis-build-init.sh --sha=$TRAVIS_COMMIT

notifications:
flowdock: ca58afe1354053b15fe75a763138829d
- "./scripts/travis-build-init.sh --sha=$TRAVIS_COMMIT"
14 changes: 14 additions & 0 deletions scripts/travis-install-phantomjs2.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash

PHANTOMSJS2_PACKAGE="phantomjs-2.1.1-linux-x86_64.tar.bz2"
PHANTOMJS2_OUTPUT="phantomjs-2.1.1-linux-x86_64"

mkdir -p $HOME/travis-phantomjs

if [ ! -d $HOME/travis-phantomjs/${PHANTOMJS2_OUTPUT} ]; then
wget https://bitbucket.org/ariya/phantomjs/downloads/${PHANTOMSJS2_PACKAGE} -O $HOME/travis-phantomjs/${PHANTOMSJS2_PACKAGE}

tar -xvf ~/travis-phantomjs/${PHANTOMSJS2_PACKAGE} -C $HOME/travis-phantomjs
fi

export PHANTOMJS_BIN=$HOME/travis-phantomjs/${PHANTOMJS2_OUTPUT}/bin/phantomjs

0 comments on commit 81b0b8b

Please sign in to comment.