-
Notifications
You must be signed in to change notification settings - Fork 3
/
.travis.yml
42 lines (34 loc) · 1.34 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
# Based on https://jekyllrb.com/docs/continuous-integration/
language: ruby
cache: bundler
addons:
firefox: "49.0.1"
rvm:
- 2.2.2
install:
- bundle install
- TAR=geckodriver-v0.11.1-linux64.tar
- wget https://github.com/mozilla/geckodriver/releases/download/v0.11.1/$TAR.gz
- gunzip $TAR.gz
- tar -xvf $TAR
- rm $TAR # Tar file hides binary on Travis: https://github.com/SeleniumHQ/selenium/issues/2966
- chmod a+x geckodriver
- export PATH=$PATH:`pwd`
before_script:
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start" # From https://docs.travis-ci.com/user/gui-and-headless-browsers/#Using-xvfb-to-Run-Tests-That-Require-a-GUI
script:
- set -e # Exit on error
- bundle exec jekyll build
- bundle exec htmlproofer ./_site --disable-external --alt-ignore '/.*/'
- PORT=5000
- bundle exec ruby -run -e httpd . -p $PORT &
- TESTS=`ls tutorials/*/test_* | perl -pne 's{.*/([^/]+/[^/]+)\.js}{tests=$1}' | xargs | tr ' ' '&'`
# For static files, we don't need all of Jekyll. Note the leading underscore in the path:
- TEST_URL=http://localhost:$PORT/tutorials/qunit.html?$TESTS
- until ( curl -I $TEST_URL | grep '200 OK' ); do sleep 1; done
- bundle exec ruby test.rb $TEST_URL
env:
global:
- NOKOGIRI_USE_SYSTEM_LIBRARIES=true # speeds up installation of html-proofer
sudo: false # route your build to the container-based infrastructure for a faster build