Skip to content

Commit

Permalink
Test on new Ruby/Rails versions (#52)
Browse files Browse the repository at this point in the history
  • Loading branch information
benlangfeld authored Sep 5, 2024
1 parent 854ee32 commit 65f7d05
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 2 deletions.
26 changes: 24 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ jobs:
strategy:
fail-fast: false
matrix:
gemfile: ['rails_5.2', 'rails_6.0', 'rails_6.1', 'rails_7.0']
gemfile: ['rails_5.2', 'rails_6.0', 'rails_6.1', 'rails_7.0', 'rails_7.1']

ruby: ['2.4', '2.5', '2.6', '2.7', '3.0', '3.1']
ruby: ['2.4', '2.5', '2.6', '2.7', '3.0', '3.1', '3.2', '3.3']

exclude:
# Rails 5.2 requires Ruby < 3.0
Expand All @@ -39,6 +39,10 @@ jobs:
gemfile: 'rails_5.2'
- ruby: '3.1'
gemfile: 'rails_5.2'
- ruby: '3.2'
gemfile: 'rails_5.2'
- ruby: '3.3'
gemfile: 'rails_5.2'
# Rails >= 6 requires Ruby >= 2.5
- ruby: '2.4'
gemfile: 'rails_6.0'
Expand All @@ -51,6 +55,12 @@ jobs:
gemfile: 'rails_7.0'
- ruby: '2.6'
gemfile: 'rails_7.0'
- ruby: '2.4'
gemfile: 'rails_7.1'
- ruby: '2.5'
gemfile: 'rails_7.1'
- ruby: '2.6'
gemfile: 'rails_7.1'

env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps
BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
Expand All @@ -66,3 +76,15 @@ jobs:

- name: Run tests
run: bundle exec rake

tests:
runs-on: ubuntu-latest
needs: test
if: always()
steps:
- name: All tests ok
if: ${{ !(contains(needs.*.result, 'failure')) }}
run: exit 0
- name: Some tests failed
if: ${{ contains(needs.*.result, 'failure') }}
run: exit 1
5 changes: 5 additions & 0 deletions Appraisals
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,8 @@ appraise 'rails-7.0' do
gem 'activemodel', '~> 7.0.0'
gem 'activesupport', '~> 7.0.0'
end

appraise 'rails-7.1' do
gem 'activemodel', '~> 7.1.0'
gem 'activesupport', '~> 7.1.0'
end
8 changes: 8 additions & 0 deletions gemfiles/rails_7.1.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# This file was generated by Appraisal

source "https://rubygems.org"

gem "activemodel", "~> 7.1.0"
gem "activesupport", "~> 7.1.0"

gemspec path: "../"

0 comments on commit 65f7d05

Please sign in to comment.