-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (44 loc) · 950 Bytes
/
ci.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
43
44
45
46
47
48
49
50
name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
ruby:
- 3.0.0
- 3.1.0
- 3.2.0
- 3.2.2
rails_version:
- ~> 5.2.0
- ~> 6.0.0
- ~> 6.1.0
- ~> 7.0.0
- ~> 7.1.0
steps:
- uses: actions/checkout@v2
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
- name: Install dependencies
run: |
gem install bundler
bundle install --jobs 4 --retry 3
- name: Rubocop
run: bundle exec rubocop
- name: Setup DB
run: |
cd test/dummy
bundle exec rake db:create db:migrate
env:
RAILS_ENV: test
- name: Run tests
run: bundle exec rails test
env:
RAILS_VERSION: ${{ matrix.rails_version }}