Add external url cache (#724)

That should help avoid the spurious failures or at least make “rebuild”
work if the remote site isn’t actually down
This commit is contained in:
Laurent Demailly 2017-11-21 05:11:47 -08:00 committed by Martin Taillefer
parent 6cad19ca6a
commit 674788dc49
3 changed files with 10 additions and 0 deletions

View File

@ -31,5 +31,13 @@ jobs:
- ./vendor/bundle
key: v1-dependencies-{{ checksum "Gemfile.lock" }}
- restore_cache:
keys:
- htmlproofer-cache
# Run the test/html checker
- run: bundle exec rake test
# save the external URLs cache
- save_cache:
key: htmlproofer-cache
paths:
- tmp/.htmlproofer

1
.gitignore vendored
View File

@ -9,3 +9,4 @@ config_override.yml
*.iml
.idea/
.bundle/
tmp/

View File

@ -3,6 +3,7 @@ require 'html-proofer'
task :test do
sh "bundle exec jekyll build"
options = { :check_html => true, # :validation => { :report_missing_names, :report_invalid_tags => true, :report_script_embeds => true },
:cache => { :timeframe => '2d'},
:assume_extension => true, :url_ignore => [/localhost|github\.com\/istio\/istio\.github\.io\/edit\/master\//] }
HTMLProofer.check_directory("./_site", options).run
end