-
Notifications
You must be signed in to change notification settings - Fork 16
107 lines (100 loc) · 3.31 KB
/
tests.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
name: tests
on: [push, pull_request]
jobs:
test:
env: # $BUNDLE_GEMFILE must be set at job level, so it is set for all steps
BUNDLE_GEMFILE: ${{ github.workspace }}/${{ matrix.gemfile }}.gemfile
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
# Ruby 3.0
- ruby: "3.0"
appraisal: "rails-6-1"
taskname: "spec"
gemfile: "appraisal_root"
rubygems: '3.5.23'
bundler: '2.5.23'
- ruby: "3.0"
appraisal: "rails-7-0"
taskname: "spec"
gemfile: "appraisal_root"
rubygems: '3.5.23'
bundler: '2.5.23'
- ruby: "3.0"
appraisal: "rails-7-1"
taskname: "spec"
gemfile: "appraisal_root"
rubygems: '3.5.23'
bundler: '2.5.23'
# Ruby 3.1
- ruby: "3.1"
appraisal: "rails-7-0"
taskname: "spec"
gemfile: "appraisal_root"
rubygems: latest
bundler: latest
- ruby: "3.1"
appraisal: "rails-7-1"
taskname: "spec"
gemfile: "appraisal_root"
rubygems: latest
bundler: latest
- ruby: "3.1"
appraisal: "rails-7-2"
taskname: "spec"
gemfile: "appraisal_root"
rubygems: latest
bundler: latest
# Ruby 3.2
- ruby: "3.2"
appraisal: "rails-7-1"
taskname: "spec"
gemfile: "appraisal_root"
rubygems: latest
bundler: latest
- ruby: "3.2"
appraisal: "rails-7-2"
taskname: "spec"
gemfile: "appraisal_root"
rubygems: latest
bundler: latest
- ruby: "3.2"
appraisal: "rails-8-0"
taskname: "spec"
gemfile: "appraisal_root"
rubygems: latest
bundler: latest
# Ruby 3.3
- ruby: "3.3"
appraisal: "rails-7-2"
taskname: "spec"
gemfile: "appraisal_root"
rubygems: latest
bundler: latest
- ruby: "3.3"
appraisal: "rails-8-0"
taskname: "spec"
gemfile: "appraisal_root"
rubygems: latest
bundler: latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Ruby & RubyGems
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
rubygems: ${{ matrix.rubygems }}
bundler: ${{ matrix.bundler }}
bundler-cache: false
# `bundle` uses BUNDLE_GEMFILE, set automatically via matrix.gemfile (i.e. appraisal_root)
# We need to do this first to get appraisal installed.
# NOTE: We do not use the root Gemfile in CI workflows at all.
- name: Bundle for Appraisal ${{ matrix.appraisal }} on Ruby ${{ matrix.ruby }}
run: bundle
- name: Install Appraisal ${{ matrix.appraisal }} dependencies on Ruby ${{ matrix.ruby }}
run: bundle exec appraisal ${{ matrix.appraisal }} bundle
- name: Run ${{ matrix.appraisal }} tests via ${{ matrix.taskname }} on Ruby ${{ matrix.ruby }}
run: bundle exec appraisal ${{ matrix.appraisal }} bundle exec rake ${{ matrix.taskname }}