diff --git a/.travis.yml b/.travis.yml index 758927e..fef41c7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,6 +8,11 @@ install: - pip install --upgrade pip - pip install ruamel.yaml +addons: + apt: + packages: + - libcurl4-openssl-dev # required to avoid SSL error (for htmlproofer) + script: - bash _scripts/travis/cibuild.sh @@ -19,7 +24,8 @@ git: cache: directories: - - vendor/bundle + - $TRAVIS_BUILD_DIR/vendor/bundle + - $TRAVIS_BUILD_DIR/tmp/.htmlproofer notifications: email: @@ -29,4 +35,5 @@ notifications: env: global: + - NOKOGIRI_USE_SYSTEM_LIBRARIES=true # speeds up installation of html-proofer - secure: "QNAqDoDQ+mF/3DFxKbc7fnYa5+FysJTX9Vs4XneH6iH63MS2lNtHfC7uT/M0/sRJaygK9eAdb+RaIeADE7CAMzqP3qdWx7l2N6qWab/kyK9KujUBsvoTGX6lDQTwC2Z+zlr5uUScHfLOhqHh6dbm6glziy2NB4dn9pVBXQrmBn09Rf9LImRT2u2h8gzmdl19hZ9TsW1/ROOb/1Soc3JElGRPrIxKI7ufHLQZt0UzZkYXGejQJwtstEEkRSmhfkJjlASeaeuyOFBvkWXjL1nKPsElwEKsAR+4II98JKA83YVqa9TJT2YSnXeLEFIhYDVSG6RLAMEU4rrITzRYC/hWKBKje4G0PDEM/cpnytk9Xhq+7oUFRmXCq3ZQgTQgzWhzl1kExC8b96hiWmQ+lVCw+Q2BG6+NloEEuOHOM839CTXfiitjRJ8KYUdLgW6IaruaingySBsbh1Vl+Dhu73QZ5H40KLdIH6woLXWAgtxkjpaL6DTeWDO6xMiwDreBa/2CJRT5R1tiG45CurZ+AkQ+yAAfSOEwGtE29oZl0sWeWMwVTaAClc0IJaG1+h8jxIVuQqHvK3fzd5RdlDtShrfCCVvQD0n29wXrdeNEg90F92kvdtmw8XgKc2P/Cl5uNzvVeTbFF3ZIHYpCVV4LW4Hn8clgYu+WUa/w4pVrBSdQOUw=" \ No newline at end of file diff --git a/Gemfile b/Gemfile index 73267dd..7103984 100644 --- a/Gemfile +++ b/Gemfile @@ -9,5 +9,9 @@ group :jekyll_plugins do gem 'jekyll-seo-tag' end +group :test do + gem 'html-proofer' +end + # Windows does not include zoneinfo files, so bundle the tzinfo-data gem gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby] diff --git a/_scripts/travis/cibuild.sh b/_scripts/travis/cibuild.sh index 1d61786..1edda8b 100644 --- a/_scripts/travis/cibuild.sh +++ b/_scripts/travis/cibuild.sh @@ -17,7 +17,10 @@ if [[ $TRAVIS_PULL_REQUEST = "false" ]]; then # triggered by author else # triggered by Pull Request + SAFE_DOMAIN=cdn.jsdelivr.net + bundle install --path vendor/bundle --quiet + python _scripts/py/init_all.py build_cmd="JEKYLL_ENV=production bundle exec jekyll build" @@ -25,4 +28,11 @@ else # triggered by Pull Request echo "\$ $build_cmd" eval $build_cmd + bundle exec htmlproofer --disable-external \ + --check-html \ + --empty_alt_ignore \ + --allow_hash_href \ + --url_ignore $SAFE_DOMAIN \ + _site/ + fi