From b2af7122e344017b882dafe955e565c769723cee Mon Sep 17 00:00:00 2001 From: Dario Berzano Date: Tue, 20 Feb 2018 15:07:53 +0100 Subject: [PATCH] Add HTMLProofer with custom options for Travis * Use more modern APT installation on Travis not requiring `sudo` * Install `libcurl4-openssl-dev` to prevent HTMLProofer OpenSSL issues (gjtorikian/html-proofer#376) * Use custom HTMLProofer to allow specifying a sensible `timeout` option (the `htmlproofer` command-line does not support options) --- .travis.yml | 8 ++++++-- script/cibuild | 2 +- script/custom_htmlproofer.rb | 5 +++++ 3 files changed, 12 insertions(+), 3 deletions(-) create mode 100755 script/custom_htmlproofer.rb diff --git a/.travis.yml b/.travis.yml index 60a7a7f1..686f57c7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,10 @@ -sudo: required dist: trusty +addons: + apt: + packages: + - curl + - libcurl4-openssl-dev + - environment-modules language: python python: - "2.7" @@ -10,7 +15,6 @@ cache: directories: - $HOME/sw/TARS before_install: | - sudo apt-get install -y curl environment-modules cd .. git clone -b IB/v5-06/next https://github.com/alisw/alidist install: | diff --git a/script/cibuild b/script/cibuild index 6638ca17..824f4012 100755 --- a/script/cibuild +++ b/script/cibuild @@ -37,5 +37,5 @@ time coverage run -a alibuild/aliBuild version # test the docs pushd alibuild jekyll build -s docs -d _site --baseurl . - htmlproofer ./_site + script/custom_htmlproofer.rb popd diff --git a/script/custom_htmlproofer.rb b/script/custom_htmlproofer.rb new file mode 100755 index 00000000..50f07dd9 --- /dev/null +++ b/script/custom_htmlproofer.rb @@ -0,0 +1,5 @@ +#!/usr/bin/env ruby +require 'html-proofer' +HTMLProofer.check_directory("./_site", + :parallel => { :in_processes => 3 }, + :typhoeus => { :timeout => 100, :ssl_verifyhost => 2 }).run