Skip to content

Commit

Permalink
improve testing and update requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
AaronLasseigne committed Aug 13, 2024
1 parent d3ef1e2 commit d727599
Show file tree
Hide file tree
Showing 9 changed files with 78 additions and 31 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Test

on: [push, pull_request]

jobs:
lint:
name: Lint
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.2"
bundler-cache: true

- name: Lint
run: bundle exec rake rubocop

test:
name: Test Ruby ${{ matrix.ruby }} on activerecord ${{ matrix.activerecord }}
strategy:
matrix:
ruby: ["3.2", "3.3"]
activerecord: ["7.1"]
include:
- activerecord: "7.0"
ruby: "3.2"
- activerecord: "6.1"
ruby: "3.1"
- activerecord: "6.0"
ruby: "3.0"
- activerecord: "5.2"
ruby: "2.7"

runs-on: ubuntu-latest
env:
BUNDLE_GEMFILE: gemfiles/activerecord-${{ matrix.activerecord }}.gemfile

steps:
- uses: actions/checkout@v4

- name: Install Prerequisites
run: sudo apt install libsqlite3-dev

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

- name: Test
run: bundle exec rake spec
23 changes: 0 additions & 23 deletions .travis.yml

This file was deleted.

4 changes: 4 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 3.0.0
* Drop support for Ruby < 2.7
* Drop support for ActiveRecord < 5.2

## 2.2.0
* Add support for ActiveRecord >= 5

Expand Down
4 changes: 1 addition & 3 deletions gemfiles/activerecord4.rb → gemfiles/activerecord-5.2.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# coding: utf-8

source 'https://rubygems.org'

gemspec path: '..'

gem 'activemodel', '~> 4.0'
gem 'activemodel', '~> 5.2.0'
4 changes: 1 addition & 3 deletions gemfiles/activerecord3.rb → gemfiles/activerecord-6.0.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# coding: utf-8

source 'https://rubygems.org'

gemspec path: '..'

gem 'activerecord', '~> 3.0'
gem 'activemodel', '~> 6.0.0'
5 changes: 5 additions & 0 deletions gemfiles/activerecord-6.1.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
source 'https://rubygems.org'

gemspec path: '..'

gem 'activemodel', '~> 6.1.0'
5 changes: 5 additions & 0 deletions gemfiles/activerecord-7.0.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
source 'https://rubygems.org'

gemspec path: '..'

gem 'activemodel', '~> 7.0.0'
5 changes: 5 additions & 0 deletions gemfiles/activerecord-7.1.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
source 'https://rubygems.org'

gemspec path: '..'

gem 'activemodel', '~> 7.1.0'
4 changes: 2 additions & 2 deletions sqlite3_ar_regexp.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ Gem::Specification.new do |spec|
spec.test_files = spec.files.grep(%r{^spec/})
spec.require_paths = ['lib']

spec.required_ruby_version = '>= 1.9.3'
spec.required_ruby_version = '>= 2.7'

spec.add_dependency 'sqlite3'
spec.add_dependency 'activerecord', '>= 3.2'
spec.add_dependency 'activerecord', '>= 5.2'

spec.add_development_dependency 'rake'
spec.add_development_dependency 'rspec'
Expand Down

0 comments on commit d727599

Please sign in to comment.