Skip to content

Commit

Permalink
Speed up jekyll test (2factorauth#4623)
Browse files Browse the repository at this point in the history
  • Loading branch information
Carlgo11 authored Feb 22, 2020
1 parent b8bc111 commit ee7216a
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 18 deletions.
25 changes: 13 additions & 12 deletions .github/workflows/jekyll.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,19 @@ jobs:
steps:
- uses: actions/checkout@v1

- name: Get Cache
id: cache
uses: actions/cache@v1
- uses: actions/cache@v1
with:
path: vendor/bundle
key: ${{ runner.os }}-bundler
path: vendor/cache
key: ${{ runner.os }}-bundle-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: ${{ runner.os }}-bundle-

- name: Install requirements
run: sudo snap install ruby --classic

- name: Run Bundler
run: bundle install --path vendor/bundle
run: |
sudo snap install ruby --classic
bundle config set path 'vendor/cache'
bundle config set cache_all true
bundle install --jobs 4 --retry 3
[ -d "vendor/cache" ] || { bundle package; }
- name: Build site
run: bundle exec jekyll build
Expand All @@ -29,10 +30,10 @@ jobs:
- name: Run build checks
run: bundle exec rake verify

- name: Test JSON files
run: bundle exec rake jsonlint

- name: Test HTML files
run: bundle exec rake proof
env:
NOKOGIRI_USE_SYSTEM_LIBRARIES: true

- name: Test JSON files
run: bundle exec rake jsonlint
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.5.3
2.7.0
10 changes: 5 additions & 5 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ end

task :proof do
HTMLProofer.check_directory(
'./_site', \
assume_extension: true, \
check_html: true, \
disable_external: true, \
cache: { timeframe: '2d', storage_dir: '/tmp/html-proofer' }
'./_site',
assume_extension: true,
check_html: true,
disable_external: true,
parallel: { in_threads: 5 }
).run
end

Expand Down

0 comments on commit ee7216a

Please sign in to comment.