Skip to content

Commit

Permalink
Merge pull request amoeba-rb#117 from jrmhaig/git_source
Browse files Browse the repository at this point in the history
Update automated tests
  • Loading branch information
jrmhaig authored Sep 27, 2023
2 parents 99d0775 + c840e4d commit b439ac6
Show file tree
Hide file tree
Showing 17 changed files with 127 additions and 53 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/jruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ jobs:
test:
runs-on: ubuntu-latest
env:
BUNDLE_GEMFILE: gemfiles/jruby_activerecord_6.1.gemfile
BUNDLE_GEMFILE: gemfiles/jruby_activerecord_7.0.gemfile
JRUBY_OPTS: --debug
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ruby_25.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
gemfile: [ activerecord_5.2, activerecord_6.0, activerecord_6.1 ]
gemfile: [ activerecord_5.2, activerecord_6.0, activerecord_6.1 ]
env:
BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ruby_26.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
gemfile: [ activerecord_5.2, activerecord_6.0, activerecord_6.1 ]
gemfile: [ activerecord_5.2, activerecord_6.0, activerecord_6.1 ]
env:
BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ruby_27.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
gemfile: [ activerecord_5.2, activerecord_6.0, activerecord_6.1, activerecord_head ]
gemfile: [ activerecord_5.2, activerecord_6.0, activerecord_6.1, activerecord_7.0, activerecord_head ]
env:
BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ruby_30.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
gemfile: [ activerecord_6.0, activerecord_6.1, activerecord_head ]
gemfile: [ activerecord_6.0, activerecord_6.1, activerecord_7.0, activerecord_head ]
# sqlite 1.3 is not compatible with Ruby 3.0+. If this changes or
# sqlite is no longer a dependency then the Active Record 5.2 tests
# can be added:
# gemfile: [ activerecord_5.2, activerecord_6.0, activerecord_6.1, activerecord_head ]
env:
BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/ruby_31.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Ruby 3.1

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
test:

runs-on: ubuntu-latest
strategy:
matrix:
gemfile: [ activerecord_6.0, activerecord_6.1, activerecord_7.0, activerecord_head ]
# sqlite 1.3 is not compatible with Ruby 3.0+. If this changes or
# sqlite is no longer a dependency then the Active Record 5.2 tests
# can be added:
# gemfile: [ activerecord_5.2, activerecord_6.0, activerecord_6.1, activerecord_head ]
env:
BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.1
bundler-cache: true
- name: Run tests
run: bundle exec rspec
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
34 changes: 34 additions & 0 deletions .github/workflows/ruby_32.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Ruby 3.2

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
test:

runs-on: ubuntu-latest
strategy:
matrix:
gemfile: [ activerecord_6.0, activerecord_6.1, activerecord_7.0, activerecord_head ]
# sqlite 1.3 is not compatible with Ruby 3.0+. If this changes or
# sqlite is no longer a dependency then the Active Record 5.2 tests
# can be added:
# gemfile: [ activerecord_5.2, activerecord_6.0, activerecord_6.1, activerecord_head ]
env:
BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2
bundler-cache: true
- name: Run tests
run: bundle exec rspec
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
4 changes: 2 additions & 2 deletions .github/workflows/ruby_head.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
gemfile: [ activerecord_6.0, activerecord_6.1, activerecord_head ]
gemfile: [ activerecord_6.0, activerecord_6.1, activerecord_7.0, activerecord_head ]
# sqlite 1.3 is not compatible with Ruby 3.0+. If this changes or
# sqlite is no longer a dependency then the Active Record 5.2 tests
# can be added:
# gemfile: [ activerecord_5.2, activerecord_6.0, activerecord_6.1, activerecord_head ]
env:
BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
Expand Down
27 changes: 17 additions & 10 deletions Appraisals
Original file line number Diff line number Diff line change
Expand Up @@ -10,40 +10,47 @@ end
appraise 'activerecord-6.0' do
gem 'activerecord', '~> 6.0.0'
group :development, :test do
gem 'sqlite3', '~> 1.4.0'
gem 'sqlite3', '~> 1.6.0'
end
end

appraise 'activerecord-6.1' do
gem 'activerecord', '~> 6.1.0'
group :development, :test do
gem 'sqlite3', '~> 1.4.0'
gem 'sqlite3', '~> 1.6.0'
end
end

appraise 'jruby-activerecord-6.1' do
gem 'activerecord', '~> 6.1.0'
appraise 'activerecord-7.0' do
gem 'activerecord', '~> 7.0.0'
group :development, :test do
gem 'sqlite3', '~> 1.6.0'
end
end

appraise 'jruby-activerecord-7.0' do
gem 'activerecord', '~> 7.0.0'
group :development, :test do
gem 'activerecord-jdbc-adapter', '~> 61.0'
gem 'activerecord-jdbcsqlite3-adapter', '~> 61.0'
gem 'activerecord-jdbc-adapter', '~> 70.1'
gem 'activerecord-jdbcsqlite3-adapter', '~> 70.1'
end
end

appraise 'activerecord-head' do
git 'git://github.com/rails/rails.git', branch: 'main' do
git 'https://github.com/rails/rails.git', branch: 'main' do
gem 'activerecord'
end
group :development, :test do
gem 'sqlite3', '~> 1.4.0'
gem 'sqlite3', '~> 1.6.0'
end
end

appraise 'jruby-activerecord-head' do
git 'git://github.com/rails/rails.git', branch: 'main' do
git 'https://github.com/rails/rails.git', branch: 'main' do
gem 'activerecord'
end
group :development, :test do
git 'git://github.com/jruby/activerecord-jdbc-adapter' do
git 'https://github.com/jruby/activerecord-jdbc-adapter' do
gem 'activerecord-jdbc-adapter'
gem 'activerecord-jdbcsqlite3-adapter',
glob: 'activerecord-jdbcsqlite3-adapter/activerecord-jdbcsqlite3-adapter.gemspec'
Expand Down
4 changes: 2 additions & 2 deletions amoeba.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ Gem::Specification.new do |s|
s.add_development_dependency 'rubocop-rspec', '~> 2.4'

if RUBY_PLATFORM == 'java'
s.add_development_dependency 'activerecord-jdbc-adapter', '~> 61.0'
s.add_development_dependency 'activerecord-jdbcsqlite3-adapter', '~> 61.0'
s.add_development_dependency 'activerecord-jdbc-adapter', '~> 70.0'
s.add_development_dependency 'activerecord-jdbcsqlite3-adapter', '~> 70.0'
else
s.add_development_dependency 'sqlite3', '>= 1.3'
end
Expand Down
2 changes: 0 additions & 2 deletions gemfiles/activerecord_5.2.gemfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# frozen_string_literal: true

# This file was generated by Appraisal

source 'https://rubygems.org'
Expand Down
4 changes: 1 addition & 3 deletions gemfiles/activerecord_6.0.gemfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# frozen_string_literal: true

# This file was generated by Appraisal

source 'https://rubygems.org'
Expand All @@ -10,7 +8,7 @@ group :development, :test do
gem 'rake'
gem 'simplecov', '~> 0.21.2'
gem 'simplecov-lcov', '~> 0.8.0'
gem 'sqlite3', '~> 1.4.0'
gem 'sqlite3', '~> 1.6.0'
end

group :local_development do
Expand Down
4 changes: 1 addition & 3 deletions gemfiles/activerecord_6.1.gemfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# frozen_string_literal: true

# This file was generated by Appraisal

source 'https://rubygems.org'
Expand All @@ -10,7 +8,7 @@ group :development, :test do
gem 'rake'
gem 'simplecov', '~> 0.21.2'
gem 'simplecov-lcov', '~> 0.8.0'
gem 'sqlite3', '~> 1.4.0'
gem 'sqlite3', '~> 1.6.0'
end

group :local_development do
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
# frozen_string_literal: true

# This file was generated by Appraisal

source 'https://rubygems.org'

gem 'activerecord', '~> 6.1.0'
gem 'activerecord', '~> 7.0.0'

group :development, :test do
gem 'activerecord-jdbc-adapter', '~> 61.0'
gem 'activerecord-jdbcsqlite3-adapter', '~> 61.0'
gem 'rake'
gem 'simplecov', '~> 0.21.2'
gem 'simplecov-lcov', '~> 0.8.0'
gem 'sqlite3', '~> 1.6.0'
end

group :local_development do
Expand Down
10 changes: 2 additions & 8 deletions gemfiles/activerecord_head.gemfile
Original file line number Diff line number Diff line change
@@ -1,22 +1,16 @@
# frozen_string_literal: true

# This file was generated by Appraisal

source 'https://rubygems.org'

git 'git://github.com/rails/arel.git' do
gem 'arel'
end

git 'git://github.com/rails/rails.git', branch: 'main' do
git 'https://github.com/rails/rails.git', branch: 'main' do
gem 'activerecord'
end

group :development, :test do
gem 'rake'
gem 'simplecov', '~> 0.21.2'
gem 'simplecov-lcov', '~> 0.8.0'
gem 'sqlite3', '~> 1.4.0'
gem 'sqlite3', '~> 1.6.0'
end

group :local_development do
Expand Down
20 changes: 20 additions & 0 deletions gemfiles/jruby_activerecord_7.0.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# This file was generated by Appraisal

source 'https://rubygems.org'

gem 'activerecord', '~> 7.0.0'

group :development, :test do
gem 'activerecord-jdbc-adapter', '~> 70.1'
gem 'activerecord-jdbcsqlite3-adapter', '~> 70.1'
gem 'rake'
gem 'simplecov', '~> 0.21.2'
gem 'simplecov-lcov', '~> 0.8.0'
end

group :local_development do
gem 'appraisal'
gem 'pry'
end

gemspec path: '../'
10 changes: 2 additions & 8 deletions gemfiles/jruby_activerecord_head.gemfile
Original file line number Diff line number Diff line change
@@ -1,19 +1,13 @@
# frozen_string_literal: true

# This file was generated by Appraisal

source 'https://rubygems.org'

git 'git://github.com/rails/arel.git' do
gem 'arel'
end

git 'git://github.com/rails/rails.git', branch: 'main' do
git 'https://github.com/rails/rails.git', branch: 'main' do
gem 'activerecord'
end

group :development, :test do
git 'git://github.com/jruby/activerecord-jdbc-adapter' do
git 'https://github.com/jruby/activerecord-jdbc-adapter' do
gem 'activerecord-jdbc-adapter'
gem 'activerecord-jdbcsqlite3-adapter',
glob: 'activerecord-jdbcsqlite3-adapter/activerecord-jdbcsqlite3-adapter.gemspec'
Expand Down

0 comments on commit b439ac6

Please sign in to comment.