Skip to content

Commit

Permalink
Add support for Rails 7.1
Browse files Browse the repository at this point in the history
  • Loading branch information
pyromaniac committed Nov 5, 2023
1 parent c204d83 commit b38583c
Show file tree
Hide file tree
Showing 16 changed files with 243 additions and 117 deletions.
25 changes: 20 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,23 @@ name: Ruby
on:
push:
branches:
- master
- main

pull_request:

jobs:
build:
runs-on: ubuntu-latest
name: Ruby ${{ matrix.ruby }}
name: Ruby ${{ matrix.ruby }}, Rails ${{ matrix.rails }}
strategy:
matrix:
ruby:
- '3.1.2'

include:
- { ruby: '2.7', rails: '6.1' }
- { ruby: '3.0', rails: '6.1' }
- { ruby: '3.1', rails: '7.0' }
- { ruby: '3.2', rails: '7.1' }
env:
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/rails.${{ matrix.rails }}.gemfile
steps:
- uses: actions/checkout@v2
- name: Set up Ruby
Expand All @@ -25,3 +29,14 @@ jobs:
bundler-cache: true
- name: Run the default task
run: bundle exec rake

rubocop:
runs-on: ubuntu-latest
name: Rubocop
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
bundler-cache: true
- run: bundle exec rubocop
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@
/tmp/
/test/dummy_app/tmp/
/test/dummy_app/db/migrate/*.rb
.ruby-version
.ruby-gemset
3 changes: 2 additions & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
AllCops:
TargetRubyVersion: 2.6
TargetRubyVersion: 2.7
Exclude:
- gemfiles/*
- test/dummy_app/**/*
- vendor/**/*

Expand Down
8 changes: 8 additions & 0 deletions Appraisals
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# frozen_string_literal: true

%w[6.0 6.1 7.0 7.1].each do |version|
appraise "rails.#{version}" do
gem "activerecord", "~> #{version}.0"
gem "activesupport", "~> #{version}.0"
end
end
6 changes: 3 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ source "https://rubygems.org"
# Specify your gem's dependencies in actual_db_schema.gemspec
gemspec

gem "rake", "~> 13.0"

gem "activerecord", "~> 7.1.0"
gem "activesupport", "~> 7.1.0"
gem "minitest", "~> 5.0"

gem "rake"
gem "rubocop", "~> 1.21"
Loading

0 comments on commit b38583c

Please sign in to comment.