forked from Shopify/ruby-style-guide
-
Notifications
You must be signed in to change notification settings - Fork 0
32 lines (26 loc) · 811 Bytes
/
ruby.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
name: Ruby
on: [push, pull_request]
jobs:
build:
name: Ruby ${{matrix.ruby}} / ${{matrix.gemfile}}
strategy:
matrix:
gemfile: [Gemfile, gemfiles/minimum_rubocop.gemfile]
ruby: ["2.7", "3.0", "3.1"]
env:
BUNDLE_GEMFILE: ${{ matrix.gemfile }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Rubocop Version
if: ${{ matrix.gemfile == 'gemfiles/minimum_rubocop.gemfile' }}
run: bundle info rubocop | head -1
- name: RuboCop and Tests
run: bundle exec rake
env:
CHECKING_RUBOCOP_VERSION_COMPATIBILITY: ${{ matrix.gemfile == 'gemfiles/minimum_rubocop.gemfile' }}