From 912b0b9ae21caf437e2a29f514e4d25b5739b02d Mon Sep 17 00:00:00 2001 From: jiop Date: Sun, 18 Sep 2016 17:47:59 +0200 Subject: [PATCH] Fix travis config file and add html-proofer test --- .travis.yml | 24 +++++++++++++++++++++--- Gemfile | 1 + scripts/cibuild | 5 +++++ 3 files changed, 27 insertions(+), 3 deletions(-) create mode 100644 scripts/cibuild diff --git a/.travis.yml b/.travis.yml index ebe27b86..62222d0c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,22 @@ -#!/usr/bin/env bash -set -e # halt script on error +language: ruby +rvm: + - 2.1 + +before_script: + - chmod +x ./scripts/cibuild # or do this locally and commit + +# Assume bundler is being used, therefore +# the `install` step will run `bundle install` by default. +script: ./scripts/cibuild + +# branch whitelist, only for GitHub Pages +branches: + only: + - gh-pages # test the gh-pages branch + +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 -bundle exec jekyll build diff --git a/Gemfile b/Gemfile index c99d6dd1..75feaf52 100644 --- a/Gemfile +++ b/Gemfile @@ -1,3 +1,4 @@ source "https://rubygems.org" gem "jekyll" +gem "html-proofer" diff --git a/scripts/cibuild b/scripts/cibuild new file mode 100644 index 00000000..97da30f2 --- /dev/null +++ b/scripts/cibuild @@ -0,0 +1,5 @@ +#!/usr/bin/env bash +set -e # halt script on error + +bundle exec jekyll build +bundle exec htmlproofer ./_site --only-4xx --allow-hash-href