Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
23 changes: 3 additions & 20 deletions .github/workflows/ext.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
name: Ext Tests

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

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

steps:
- uses: actions/checkout@v3
Expand All @@ -24,28 +23,12 @@ jobs:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true

- name: Cache Appraisal gems
id: cache-appraisal-gems
uses: actions/cache@v4
with:
path: vendor/bundle
key: ${{ runner.os }}-appraisals-${{ matrix.ruby }}-${{ hashFiles('gemfiles/*.gemfile.lock') }}
restore-keys: |
${{ runner.os }}-appraisals-${{ matrix.ruby }}-

- name: Resolve appraisals dependencies
run: |
bundle config path vendor/bundle
bundle exec appraisal install
bundle exec appraisal bundle install

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

- name: Run rails_main appraisal
if: ${{ github.event_name == 'schedule' }}
run: bundle exec appraisal rails_main rspec spec/ext/*
env:
ENABLE_EXTERNAL_TESTS: ${{ secrets.ENABLE_EXTERNAL_TESTS }}
TEST_PG_URL: ${{ secrets.TEST_PG_URL }}
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
Gemfile.lock
*.gem
.idea

*.gemfile.lock
# rspec failure tracking
.rspec_status

14 changes: 7 additions & 7 deletions Appraisals
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
appraise "rails_7_0" do
appraise "active_record_7_0" do
gem "activerecord", "~> 7.0.0"
end

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

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

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

# appraise "rails_main" do
# gem "activerecord", github: "rails/rails"
# end
appraise "active_record_8_1" do
gem "activerecord", "~> 8.1.0"
end
16 changes: 8 additions & 8 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ 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")
ext_versions = `appraisal list`.split("\n")

rails_versions.each do |rails_version|
puts ">> Appraising #{rails_version}"
# Since we want to test against the main branch separately, we remove it from the list.
ext_versions.reject! { |version| version.end_with?("_head") }

system("bundle exec appraisal #{rails_version} rspec spec/ext/*")
ext_versions.each do |ext_version|
puts ">> Appraising #{ext_version}"

gem_name = ext_version.sub(/_\d+(_\d+)*$/, "")
system "bundle exec appraisal #{ext_version} rspec spec/ext/#{gem_name}/"
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ gem "rubocop", "~> 1.65.0", require: false
gem "activerecord", "~> 7.0.0"

group :test do
gem "ostruct"
gem "benchmark"
gem "activesupport"
gem "http"
gem "pg"
gem "mysql2"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ gem "rubocop", "~> 1.65.0", require: false
gem "activerecord", "~> 7.1.0"

group :test do
gem "ostruct"
gem "benchmark"
gem "activesupport"
gem "http"
gem "pg"
gem "mysql2"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ gem "rubocop", "~> 1.65.0", require: false
gem "activerecord", "~> 7.2.0"

group :test do
gem "ostruct"
gem "benchmark"
gem "activesupport"
gem "http"
gem "pg"
gem "mysql2"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ gem "rubocop", "~> 1.65.0", require: false
gem "activerecord", "~> 8.0.0"

group :test do
gem "ostruct"
gem "benchmark"
gem "activesupport"
gem "http"
gem "pg"
gem "mysql2"
Expand Down
28 changes: 28 additions & 0 deletions gemfiles/active_record_8_1.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# 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.1.0"

group :test do
gem "ostruct"
gem "benchmark"
gem "activesupport"
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: "../"
165 changes: 0 additions & 165 deletions gemfiles/rails_7_0.gemfile.lock

This file was deleted.

Loading