Skip to content

Commit

Permalink
Optimized workflow to use less jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
Pedro Augusto committed Mar 21, 2024
1 parent 97ab276 commit 1483d03
Showing 1 changed file with 2 additions and 40 deletions.
42 changes: 2 additions & 40 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ on:
pull_request:

jobs:
rubocop:
rubocop_and_minitest:
runs-on: ubuntu-latest
name: Rubocop
name: Rubocop and Minitest
strategy:
matrix:
ruby:
Expand All @@ -23,45 +23,7 @@ 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 rubocop --parallel

minitest:
runs-on: ubuntu-latest
name: Minitest
strategy:
matrix:
ruby:
- '3.2.2'

steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
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 Minitest
run: bundle exec rake test

0 comments on commit 1483d03

Please sign in to comment.