From d620cc989ee973c528b099d8f03c6ee3d29c4c48 Mon Sep 17 00:00:00 2001 From: Chris Colvard Date: Mon, 16 Nov 2020 11:06:35 -0500 Subject: [PATCH] Speedup rubocop by running in parallel and with caching --- src/commands/rubocop.yml | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/src/commands/rubocop.yml b/src/commands/rubocop.yml index 612847c..6f16f84 100644 --- a/src/commands/rubocop.yml +++ b/src/commands/rubocop.yml @@ -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