From 674788dc49b70c246c1542cdb514c7457a9d7b87 Mon Sep 17 00:00:00 2001 From: Laurent Demailly Date: Tue, 21 Nov 2017 05:11:47 -0800 Subject: [PATCH] Add external url cache (#724) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit That should help avoid the spurious failures or at least make “rebuild” work if the remote site isn’t actually down --- .circleci/config.yml | 8 ++++++++ .gitignore | 1 + Rakefile | 1 + 3 files changed, 10 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 11205f791e..b52390a91f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -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 diff --git a/.gitignore b/.gitignore index 2d51f1ea83..39b7d9de23 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ config_override.yml *.iml .idea/ .bundle/ +tmp/ diff --git a/Rakefile b/Rakefile index e8db52863c..eb0f6e02a3 100644 --- a/Rakefile +++ b/Rakefile @@ -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