-
Notifications
You must be signed in to change notification settings - Fork 36
64 lines (62 loc) · 1.57 KB
/
check.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
56
57
58
59
60
61
62
63
64
name: Check the code
on:
push:
branches:
- master
pull_request:
branches:
- master
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
defaults:
run:
shell: bash
jobs:
lint:
name: lint (ruby 3.2, rails 7.1)
runs-on: ubuntu-latest
env:
BUNDLE_GEMFILE: ${{ github.workspace }}/.github/gemfiles/rails_7.1.gemfile
BUNDLE_RETRY: 1
steps:
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2'
bundler-cache: true
- run: bundle exec rubocop
test-legacy:
name: test (ruby 2.3, rails 4.2)
runs-on: ubuntu-latest
env:
BUNDLER_VERSION: '1.17.3'
BUNDLE_GEMFILE: ${{ github.workspace }}/.github/gemfiles/rails_4.2.gemfile
BUNDLE_RETRY: 1
steps:
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.3
rubygems: 3.2.3
bundler: 1
bundler-cache: true
- run: bundle exec rake
test:
name: test (ruby ${{ matrix.ruby }}, rails ${{ matrix.rails }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ruby: ['3.2']
rails: ['6.0', '7.1']
env:
BUNDLE_GEMFILE: ${{ github.workspace }}/.github/gemfiles/rails_${{ matrix.rails }}.gemfile
BUNDLE_RETRY: 1
steps:
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- run: bundle exec rake