-
Notifications
You must be signed in to change notification settings - Fork 35
55 lines (50 loc) · 1.4 KB
/
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
51
52
53
54
55
name: CI
on:
push:
branches: [ master ]
pull_request:
jobs:
linting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
bundler-cache: true # 'bundle install' and cache
- name: Rubocop
run: bundle exec rubocop --format progress
- name: Inch
run: "ruby -e \"require 'json'; res = JSON.parse('$(bundle exec inch stats --format=json)')['grade_lists']; exit(1) if res['C'].positive? || res['U'].positive?\""
test:
needs: [linting]
runs-on: ubuntu-latest
env:
RAILS_VERSION: '~> ${{ matrix.rails }}'
strategy:
matrix:
ruby: [ '2.7', '3.0', '3.1', '3.2' ]
rails: [ '6.0.0', '6.1.0', '7.0.0', '7.1.0', '7.2.0', '8.0.0' ]
exclude:
- ruby: '2.7'
rails: '7.2.0'
- ruby: '2.7'
rails: '8.0.0'
- ruby: '3.0'
rails: '7.2.0'
- ruby: '3.0'
rails: '8.0.0'
- ruby: '3.1'
rails: '8.0.0'
- ruby: '3.2'
rails: '6.0.0'
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true # 'bundle install' and cache
- name: Run tests
run: bundle exec rake