From 35d175927ed10d1ff77f716ed181d72ae2311436 Mon Sep 17 00:00:00 2001 From: Pedro Augusto Date: Thu, 21 Mar 2024 18:46:27 -0300 Subject: [PATCH] Improved Rubocop workflow job --- .github/workflows/main.yml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 379d46f..10e945a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -8,7 +8,7 @@ on: pull_request: jobs: - build: + rubocop: runs-on: ubuntu-latest name: Rubocop strategy: @@ -23,5 +23,16 @@ jobs: with: ruby-version: ${{ matrix.ruby }} bundler-cache: true + - name: Cache gems + uses: actions/cache@v1 + with: + path: vendor/bundle + key: ${{ runner.os }}-rubocop-${{ hashFiles('**/Gemfile.lock') }} + restore-keys: | + ${{ runner.os }}-rubocop- + - name: Install gems + run: | + bundle config path vendor/bundle + bundle install --jobs 4 --retry 3 - name: Run Rubocop - run: bundle exec rake rubocop + run: bundle exec rubocop --parallel