Skip to content

Commit 98785af

Browse files
committed
Minimize CI matrix to earliest and latest versions
- Ruby: 3.2 and 4.0 (was 3.2, 3.3, 3.4, 4.0) - Rails: 7.2 and 8.1 (was 7.2, 8.0, 8.1) - Add RAILS_VERSION env var to dynamically set Rails version - Update actions/checkout from v3 to v6 Reduces CI runs from 12 to 4 while still testing boundary versions.
1 parent a58067d commit 98785af

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ jobs:
1414
strategy:
1515
fail-fast: false
1616
matrix:
17-
ruby: ["3.2", "3.3", "3.4", "4.0"]
18-
rails: ["7.2", "8.0", "8.1"]
17+
ruby: ["3.2", "4.0"]
18+
rails: ["7.2", "8.1"]
1919

2020
services:
2121
postgres:
@@ -34,9 +34,10 @@ jobs:
3434
3535
env:
3636
POSTGRES_USER: postgres
37+
RAILS_VERSION: ${{ matrix.rails }}
3738

3839
steps:
39-
- uses: actions/checkout@v3
40+
- uses: actions/checkout@v6
4041

4142
- name: Set up Ruby
4243
uses: ruby/setup-ruby@v1

Gemfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
source "https://rubygems.org"
22

3+
rails_version = ENV.fetch("RAILS_VERSION", "8.1")
4+
35
gemspec
46

7+
gem "activerecord", "~> #{rails_version}.0"
8+
gem "railties", "~> #{rails_version}.0"
9+
510
gem "bundler", ">= 1.5"
611
gem "pg"
712
gem "pry"

0 commit comments

Comments
 (0)