Skip to content

Commit 2ef5831

Browse files
committed
add supported rails versions to ci
1 parent b209088 commit 2ef5831

File tree

5 files changed

+26
-3
lines changed

5 files changed

+26
-3
lines changed

.github/workflows/test.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,12 @@ jobs:
1414
runs-on: ubuntu-latest
1515
strategy:
1616
matrix:
17-
ruby: ['3.4', '3.3', '3.2', '3.1']
1817
database: ['sqlite', 'postgres', 'mysql', 'mariadb']
18+
ruby: ['3.4', '3.3', '3.2']
19+
rails: ['7.0', '7.1', '7.2', '8.0', 'edge']
1920
services:
2021
postgres:
22+
if: ${{matrix.database == 'postgres'}}
2123
image: postgres:15
2224
ports:
2325
- 5432:5432
@@ -26,13 +28,15 @@ jobs:
2628
POSTGRES_PASSWORD: postgres
2729
POSTGRES_DB: test
2830
mysql:
31+
if: ${{matrix.database == 'mysql'}}
2932
image: mysql:8.0
3033
ports:
3134
- 3306:3306
3235
env:
3336
MYSQL_ROOT_PASSWORD: root
3437
MYSQL_DATABASE: test
3538
mariadb:
39+
if: ${{matrix.database == 'mariadb'}}
3640
image: 'mariadb:11'
3741
env:
3842
MARIADB_ROOT_PASSWORD: root
@@ -45,6 +49,8 @@ jobs:
4549
--health-retries=5
4650
ports:
4751
- 3307:3306 # avoid conflict w/ mysql
52+
env:
53+
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/rails_${{replace(matrix.rails, '.', '_')}}.gemfile
4854
steps:
4955
- name: Checkout
5056
uses: actions/checkout@v4
@@ -72,5 +78,6 @@ jobs:
7278
- name: Test
7379
run: bundle exec rake test
7480
# sqlite is not supported yet because it doesn't support
75-
# the union syntax we're using
76-
continue-on-error: ${{matrix.database == 'sqlite'}}
81+
# the union syntax we're using (and we don't consider
82+
# failures for unreleased rails versions a blocker)
83+
continue-on-error: ${{matrix.database == 'sqlite' || matrix.rails == 'edge'}}

gemfiles/rails_7_0.gemfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
source 'https://rubygems.org'
2+
3+
gemspec path: '../'
4+
gem 'rails', '~> 7.0'

gemfiles/rails_7_1.gemfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
source 'https://rubygems.org'
2+
3+
gemspec path: '../'
4+
gem 'rails', '~> 7.1'

gemfiles/rails_7_2.gemfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
source 'https://rubygems.org'
2+
3+
gemspec path: '../'
4+
gem 'rails', '~> 7.2'

gemfiles/rails_8_0.gemfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
source 'https://rubygems.org'
2+
3+
gemspec path: '../'
4+
gem 'rails', '~> 8'

0 commit comments

Comments
 (0)