Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions .github/workflows/activerecord_appraisals.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: ActiveRecord Appraisals

on:
schedule: [ cron: '0 0 * * *' ]
pull_request:

jobs:
appraise:
runs-on: ubuntu-latest
strategy:
max-parallel: 1
matrix:
ruby:
- '3.1'
- '3.2'
- '3.3'
- '3.4'

steps:
- uses: actions/checkout@v3

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true

- name: Resolve appraisals dependencies
run: bundle exec appraisal install

- name: Run all versioned appraisals
if: ${{ github.event_name != 'schedule' }}
run: bundle exec rake appraise

- name: Run rails_main appraisal
if: ${{ github.event_name == 'schedule' }}
run: bundle exec appraisal rails_main rspec spec/ext/*
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@ Gemfile.lock

# rspec failure tracking
.rspec_status

# Appraisal's gem lockfiles
*.gemfile.lock
1 change: 1 addition & 0 deletions .rspec
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
--format documentation
--color
--require spec_helper
--exclude-pattern 'spec/ext/**/**_spec.rb'
19 changes: 19 additions & 0 deletions Appraisals
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
appraise "rails_7_0" do
gem "activerecord", "~> 7.0.0"
end

appraise "rails_7_1" do
gem "activerecord", "~> 7.1.0"
end

appraise "rails_7_2" do
gem "activerecord", "~> 7.2.0"
end

appraise "rails_8_0" do
gem "activerecord", "~> 8.0.0"
end

appraise "rails_main" do
gem "activerecord", github: "rails/rails"
end
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ group :test do
gem "websocket-client-simple"
gem "prism"
gem "redis-client"
gem "appraisal", "~> 2.5"
end
14 changes: 14 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,17 @@ require "rspec/core/rake_task"
RSpec::Core::RakeTask.new(:spec)

task default: :spec

task :appraise do |_, args|
# Pulls all the Rails versions from the Appraisal file
rails_versions = `appraisal list`.split("\n")
# Since we want to test against the main branch separately,
# we remove it from the list.
rails_versions.delete("rails_main")

rails_versions.each do |rails_version|
puts ">> Appraising #{rails_version}"

system("bundle exec appraisal #{rails_version} rspec spec/ext/*")
end
end
25 changes: 25 additions & 0 deletions gemfiles/rails_7_0.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# This file was generated by Appraisal

source "https://rubygems.org"

gem "rake", "~> 13.0"
gem "rspec", "~> 3.0"
gem "yard"
gem "rubocop", "~> 1.65.0", require: false
gem "activerecord", "~> 7.0.0"

group :test do
gem "http"
gem "pg"
gem "mysql2"
gem "bigdecimal"
gem "connection_pool", "~> 2.0"
gem "rbnacl"
gem "domain_name"
gem "websocket-client-simple"
gem "prism"
gem "redis-client"
gem "appraisal", "~> 2.5"
end

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

source "https://rubygems.org"

gem "rake", "~> 13.0"
gem "rspec", "~> 3.0"
gem "yard"
gem "rubocop", "~> 1.65.0", require: false
gem "activerecord", "~> 7.1.0"

group :test do
gem "http"
gem "pg"
gem "mysql2"
gem "bigdecimal"
gem "connection_pool", "~> 2.0"
gem "rbnacl"
gem "domain_name"
gem "websocket-client-simple"
gem "prism"
gem "redis-client"
gem "appraisal", "~> 2.5"
end

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

source "https://rubygems.org"

gem "rake", "~> 13.0"
gem "rspec", "~> 3.0"
gem "yard"
gem "rubocop", "~> 1.65.0", require: false
gem "activerecord", "~> 7.2.0"

group :test do
gem "http"
gem "pg"
gem "mysql2"
gem "bigdecimal"
gem "connection_pool", "~> 2.0"
gem "rbnacl"
gem "domain_name"
gem "websocket-client-simple"
gem "prism"
gem "redis-client"
gem "appraisal", "~> 2.5"
end

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

source "https://rubygems.org"

gem "rake", "~> 13.0"
gem "rspec", "~> 3.0"
gem "yard"
gem "rubocop", "~> 1.65.0", require: false
gem "activerecord", "~> 8.0.0"

group :test do
gem "http"
gem "pg"
gem "mysql2"
gem "bigdecimal"
gem "connection_pool", "~> 2.0"
gem "rbnacl"
gem "domain_name"
gem "websocket-client-simple"
gem "prism"
gem "redis-client"
gem "appraisal", "~> 2.5"
end

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

source "https://rubygems.org"

gem "rake", "~> 13.0"
gem "rspec", "~> 3.0"
gem "yard"
gem "rubocop", "~> 1.65.0", require: false
gem "activerecord", github: "rails/rails"

group :test do
gem "http"
gem "pg"
gem "mysql2"
gem "bigdecimal"
gem "connection_pool", "~> 2.0"
gem "rbnacl"
gem "domain_name"
gem "websocket-client-simple"
gem "prism"
gem "redis-client"
gem "appraisal", "~> 2.5"
end

gemspec path: "../"
9 changes: 9 additions & 0 deletions spec/ext/active_record/connection_pool_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# frozen_string_literal: true

RSpec.describe Rage::Ext::ActiveRecord::ConnectionPool do
describe ".with_connection" do
it "works" do
expect(1 + 1).to eq(2)
end
end
end
Loading