Skip to content

Commit

Permalink
chore(ci): test against 3 latest rails versions
Browse files Browse the repository at this point in the history
  • Loading branch information
theodorton committed Sep 21, 2024
1 parent 0a9214e commit 55a661d
Show file tree
Hide file tree
Showing 8 changed files with 58 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ jobs:
- '3.1'
- '3.2'
- '3.3'
rails-version:
- '6.1'
- '7.0'
- '7.1'
env:
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/rails_${{ matrix.rails-version }}.gemfile

steps:
- uses: actions/checkout@v4
Expand All @@ -24,5 +30,6 @@ jobs:
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true # runs 'bundle install' and caches installed gems automatically

- name: Run tests
run: bundle exec rake
run: bundle exec appraisal rails-${{ matrix.rails-version }} rake
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
.config
.yardoc
Gemfile.lock
gemfiles/*.lock
InstalledFiles
_yardoc
coverage
Expand Down
2 changes: 2 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
AllCops:
NewCops: disable
Exclude:
- 'gemfiles/*'

Layout/LineLength:
Max: 100
Expand Down
19 changes: 19 additions & 0 deletions Appraisals
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# frozen_string_literal: true

appraise 'rails-6.1' do
gem 'activemodel', '~> 6.1.0'
gem 'activesupport', '~> 6.1.0'
gem 'shoulda-matchers'
end

appraise 'rails-7.0' do
gem 'activemodel', '~> 7.0.0'
gem 'activesupport', '~> 7.0.0'
gem 'shoulda-matchers'
end

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

source "https://rubygems.org"

gem "activemodel", "~> 6.1.0"
gem "activesupport", "~> 6.1.0"
gem "shoulda-matchers"

gemspec path: "../"
9 changes: 9 additions & 0 deletions gemfiles/rails_7.0.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# This file was generated by Appraisal

source "https://rubygems.org"

gem "activemodel", "~> 7.0.0"
gem "activesupport", "~> 7.0.0"
gem "shoulda-matchers"

gemspec path: "../"
9 changes: 9 additions & 0 deletions gemfiles/rails_7.1.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# This file was generated by Appraisal

source "https://rubygems.org"

gem "activemodel", "~> 7.1.0"
gem "activesupport", "~> 7.1.0"
gem "shoulda-matchers"

gemspec path: "../"
1 change: 1 addition & 0 deletions google_distance_matrix.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ Gem::Specification.new do |spec|
spec.add_dependency 'activesupport', '>= 3.2.13', '< 7.2'
spec.add_dependency 'google_business_api_url_signer', '~> 0.1.3'

spec.add_development_dependency 'appraisal'
spec.add_development_dependency 'bundler'
spec.add_development_dependency 'rake'
spec.add_development_dependency 'rspec', '~> 3.12.0'
Expand Down

0 comments on commit 55a661d

Please sign in to comment.