Skip to content

Commit

Permalink
Speedup rubocop by running in parallel and with caching
Browse files Browse the repository at this point in the history
  • Loading branch information
cjcolvar committed Nov 16, 2020
1 parent 6030d82 commit d620cc9
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 d620cc9

Please sign in to comment.