Skip to content

Commit

Permalink
Merge pull request #46 from samvera-labs/parallel_cached_rubocop
Browse files Browse the repository at this point in the history
Speedup rubocop by running in parallel and with caching
  • Loading branch information
tpendragon authored Nov 17, 2020
2 parents 6030d82 + d620cc9 commit 6517aa0
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions src/commands/rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
description: Runs rubocop
parameters:
cache_version:
type: string
default: '1'

steps:
- restore_cache:
name: Restore rubocop cache
keys:
- v<< parameters.cache_version >>-rubocop-{{ .Environment.CIRCLE_BRANCH }}
- v<< parameters.cache_version >>-rubocop
- run:
name: Call Rubocop
command: bundle exec rubocop
name: Call Rubocop in parallel
command: bundle exec rubocop --parallel

- save_cache:
name: Save rubocop cache
key: v<< parameters.cache_version >>-rubocop-{{ .Environment.CIRCLE_BRANCH }}
paths:
- ~/.cache

0 comments on commit 6517aa0

Please sign in to comment.