-
Notifications
You must be signed in to change notification settings - Fork 94
53 lines (46 loc) · 1.37 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
name: CI
on:
push:
branches: [main, v2]
pull_request:
branches: ["**"]
jobs:
test:
name: test (${{ matrix.rails_version }}, ${{ matrix.ruby_version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- ruby_version: "3.0"
rails_version: "6.1"
- ruby_version: "3.1"
rails_version: "7.0"
- ruby_version: "3.2"
rails_version: "7.1"
- ruby_version: "3.3"
rails_version: "7.2"
# - ruby_version: "3.3"
# rails_version: "head"
env:
BUNDLE_GEMFILE: gemfiles/rails_${{ matrix.rails_version }}.gemfile
steps:
- uses: actions/checkout@v3
- name: Set up Ruby ${{ matrix.ruby_version }}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby_version }}
bundler-cache: true
- name: Set system gem command
run: gem update --system
- name: Install bundler
run: gem install bundler
- name: Bundle for Appraisal
run: bundle
- name: Build and test
run: |
bundle exec appraisal rails-${{ matrix.rails_version }} bundle
bundle exec appraisal rails-${{ matrix.rails_version }} rspec
env:
RAILS_VERSION: ${{ matrix.rails_version }}
RUBY_VERSION: ${{ matrix.ruby_version }}