-
Notifications
You must be signed in to change notification settings - Fork 5
42 lines (38 loc) · 1.15 KB
/
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
33
34
35
36
37
38
39
40
41
42
name: Ruby
on:
push:
branches: [ "master" ]
paths-ignore:
- 'README.md'
- 'CHANGELOG.md'
pull_request:
branches: [ "master" ]
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-22.04 # at time of writing ubuntu-latest was still 20.04
env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps
BUNDLE_GEMFILE: test/gemfiles/${{ matrix.gemfile }}
strategy:
matrix:
ruby-version: [ '2.6', '2.7', '3.0', '3.1' ]
gemfile: [ 'rails-6.0' , 'rails-6.1' ]
include:
- ruby-version: '2.6'
gemfile: rails-4.2 # EOL
bundler: '1.17.3' # requires bundler < 2
- ruby-version: '2.6'
gemfile: rails-5.2 # EOL
- ruby-version: '3.1'
gemfile: rails-7.0 # ruby >= 3.1.0 only
steps:
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
bundler: ${{ matrix.bundler }}
- name: Run tests
run: bundle exec rake