diff --git a/.github/workflows/mysql.yml b/.github/workflows/mysql.yml index 45156a5..de19cc2 100644 --- a/.github/workflows/mysql.yml +++ b/.github/workflows/mysql.yml @@ -5,70 +5,24 @@ on: # but only for the master branch push: branches: - - master + - main pull_request: branches: - - master + - main jobs: mysql: strategy: fail-fast: false matrix: - ruby_version: [3.0, 2.7, 2.6, 2.5, jruby] + ruby_version: [3.2, 3.1, 3.0, 2.7] gemfile: [ - spec/gemfiles/Gemfile.rails50, - spec/gemfiles/Gemfile.rails51, - spec/gemfiles/Gemfile.rails52, spec/gemfiles/Gemfile.rails60, spec/gemfiles/Gemfile.rails61, + spec/gemfiles/Gemfile.rails70, spec/gemfiles/Gemfile.rails, ] - exclude: - # Ruby 3.x is not supported by Rails 5.2.x - - ruby_version: 3.0 - gemfile: spec/gemfiles/Gemfile.rails52 - # Ruby 3.x is not supported by Rails 5.1.x - - ruby_version: 3.0 - gemfile: spec/gemfiles/Gemfile.rails51 - # Ruby 3.x is not supported by Rails 5.0.x - - ruby_version: 3.0 - gemfile: spec/gemfiles/Gemfile.rails50 - - - ruby_version: 2.6 - gemfile: spec/gemfiles/Gemfile.rails32 - - # Ruby 2.6.x is not supported by Rails main - - ruby_version: 2.6 - gemfile: spec/gemfiles/Gemfile.rails - - # Ruby 2.5.x is not supported by Rails main - - ruby_version: 2.5 - gemfile: spec/gemfiles/Gemfile.rails - - # Ruby 2.4.x is not supported by Rails main - - ruby_version: 2.4 - gemfile: spec/gemfiles/Gemfile.rails - # Ruby 2.4.x is not supported by Rails 6.1.x - - ruby_version: 2.4 - gemfile: spec/gemfiles/Gemfile.rails61 - # Ruby 2.4.x is not supported by Rails 6.0.x - - ruby_version: 2.4 - gemfile: spec/gemfiles/Gemfile.rails60 - # Ruby 2.3.x is not supported by Rails 6.1.x - - ruby_version: 2.3 - gemfile: spec/gemfiles/Gemfile.rails61 - # Ruby 2.3.x is not supported by Rails main - - ruby_version: 2.3 - gemfile: spec/gemfiles/Gemfile.rails - # Ruby 2.3.x is not supported by Rails 6.0.x - - ruby_version: 2.3 - gemfile: spec/gemfiles/Gemfile.rails60 - # JRuby is not supported by Rails main - - ruby_version: jruby - gemfile: spec/gemfiles/Gemfile.rails - runs-on: ubuntu-latest steps: @@ -78,15 +32,16 @@ jobs: uses: ruby/setup-ruby@master with: ruby-version: ${{ matrix.ruby_version }} + bundler-cache: true - name: Start MySQL - - run: sudo /etc/init.d/mysql start + run: | + sudo systemctl start mysql.service - name: Build and test with Rake env: BUNDLE_GEMFILE: ${{ matrix.gemfile }} - DB: "postgres" + DB: "mysql" run: | - gem install bundler bundle install --jobs 4 --retry 3 bundle exec rake diff --git a/.github/workflows/postgresql.yml b/.github/workflows/postgresql.yml index a7e3977..6c4f020 100644 --- a/.github/workflows/postgresql.yml +++ b/.github/workflows/postgresql.yml @@ -5,70 +5,24 @@ on: # but only for the master branch push: branches: - - master + - main pull_request: branches: - - master + - main jobs: postgresql: strategy: fail-fast: false matrix: - ruby_version: [3.0, 2.7, 2.6, 2.5, jruby] + ruby_version: [3.2, 3.1, 3.0, 2.7] gemfile: [ - spec/gemfiles/Gemfile.rails50, - spec/gemfiles/Gemfile.rails51, - spec/gemfiles/Gemfile.rails52, spec/gemfiles/Gemfile.rails60, spec/gemfiles/Gemfile.rails61, + spec/gemfiles/Gemfile.rails70, spec/gemfiles/Gemfile.rails, ] - exclude: - # Ruby 3.x is not supported by Rails 5.2.x - - ruby_version: 3.0 - gemfile: spec/gemfiles/Gemfile.rails52 - # Ruby 3.x is not supported by Rails 5.1.x - - ruby_version: 3.0 - gemfile: spec/gemfiles/Gemfile.rails51 - # Ruby 3.x is not supported by Rails 5.0.x - - ruby_version: 3.0 - gemfile: spec/gemfiles/Gemfile.rails50 - - - ruby_version: 2.6 - gemfile: spec/gemfiles/Gemfile.rails32 - - # Ruby 2.6.x is not supported by Rails main - - ruby_version: 2.6 - gemfile: spec/gemfiles/Gemfile.rails - - # Ruby 2.5.x is not supported by Rails main - - ruby_version: 2.5 - gemfile: spec/gemfiles/Gemfile.rails - - # Ruby 2.4.x is not supported by Rails main - - ruby_version: 2.4 - gemfile: spec/gemfiles/Gemfile.rails - # Ruby 2.4.x is not supported by Rails 6.1.x - - ruby_version: 2.4 - gemfile: spec/gemfiles/Gemfile.rails61 - # Ruby 2.4.x is not supported by Rails 6.0.x - - ruby_version: 2.4 - gemfile: spec/gemfiles/Gemfile.rails60 - # Ruby 2.3.x is not supported by Rails 6.1.x - - ruby_version: 2.3 - gemfile: spec/gemfiles/Gemfile.rails61 - # Ruby 2.3.x is not supported by Rails main - - ruby_version: 2.3 - gemfile: spec/gemfiles/Gemfile.rails - # Ruby 2.3.x is not supported by Rails 6.0.x - - ruby_version: 2.3 - gemfile: spec/gemfiles/Gemfile.rails60 - # JRuby is not supported by Rails main - - ruby_version: jruby - gemfile: spec/gemfiles/Gemfile.rails - runs-on: ubuntu-latest steps: @@ -78,14 +32,11 @@ jobs: uses: ruby/setup-ruby@master with: ruby-version: ${{ matrix.ruby_version }} - - - uses: harmon758/postgresql-action@v1 - with: - postgresql version: '11' + bundler-cache: true - name: Start PostgreSQL run: | - sudo service postgresql start + sudo systemctl start postgresql.service sudo -u postgres createuser --superuser "$USER" createdb by_star_test @@ -94,6 +45,5 @@ jobs: BUNDLE_GEMFILE: ${{ matrix.gemfile }} DB: "postgres" run: | - gem install bundler bundle install --jobs 4 --retry 3 bundle exec rake diff --git a/spec/gemfiles/Gemfile.rails b/spec/gemfiles/Gemfile.rails index cfbf158..239df60 100644 --- a/spec/gemfiles/Gemfile.rails +++ b/spec/gemfiles/Gemfile.rails @@ -3,3 +3,4 @@ source 'http://rubygems.org' gemspec path: '../../' gem 'activerecord', github: 'rails', branch: "main" +gem 'chronic' diff --git a/spec/gemfiles/Gemfile.rails40 b/spec/gemfiles/Gemfile.rails40 deleted file mode 100644 index f0f15c6..0000000 --- a/spec/gemfiles/Gemfile.rails40 +++ /dev/null @@ -1,7 +0,0 @@ -source 'http://rubygems.org' - -gemspec path: '../../' - -gem 'activerecord', '~> 4.0.0' -gem 'pg', '~> 0.11' -gem 'mongoid' diff --git a/spec/gemfiles/Gemfile.rails41 b/spec/gemfiles/Gemfile.rails41 deleted file mode 100644 index 7d51c71..0000000 --- a/spec/gemfiles/Gemfile.rails41 +++ /dev/null @@ -1,7 +0,0 @@ -source 'http://rubygems.org' - -gemspec path: '../../' - -gem 'activerecord', '~> 4.1.0' -gem 'pg', '~> 0.11' -gem 'mongoid' diff --git a/spec/gemfiles/Gemfile.rails42 b/spec/gemfiles/Gemfile.rails42 deleted file mode 100644 index 67e6e01..0000000 --- a/spec/gemfiles/Gemfile.rails42 +++ /dev/null @@ -1,7 +0,0 @@ -source 'http://rubygems.org' - -gemspec path: '../../' - -gem 'activerecord', '~> 4.2.0' -gem 'pg', '~> 0.15' -gem 'mongoid' diff --git a/spec/gemfiles/Gemfile.rails50 b/spec/gemfiles/Gemfile.rails50 deleted file mode 100644 index 9acfe0a..0000000 --- a/spec/gemfiles/Gemfile.rails50 +++ /dev/null @@ -1,7 +0,0 @@ -source 'http://rubygems.org' - -gemspec path: '../../' - -gem 'activerecord', '~> 5.0.0' -gem 'pg', '~> 0.18' -gem 'mongoid' diff --git a/spec/gemfiles/Gemfile.rails51 b/spec/gemfiles/Gemfile.rails51 deleted file mode 100644 index 8dd5f69..0000000 --- a/spec/gemfiles/Gemfile.rails51 +++ /dev/null @@ -1,7 +0,0 @@ -source 'http://rubygems.org' - -gemspec path: '../../' - -gem 'activerecord', '~> 5.1.0' -gem 'pg', '~> 0.18' -gem 'mongoid' diff --git a/spec/gemfiles/Gemfile.rails52 b/spec/gemfiles/Gemfile.rails52 deleted file mode 100644 index 9aaebf2..0000000 --- a/spec/gemfiles/Gemfile.rails52 +++ /dev/null @@ -1,7 +0,0 @@ -source 'http://rubygems.org' - -gemspec path: '../../' - -gem 'activerecord', '~> 5.2.0' -gem 'pg', '~> 0.18' -gem 'mongoid' diff --git a/spec/gemfiles/Gemfile.rails60 b/spec/gemfiles/Gemfile.rails60 index 803884b..85ca46c 100644 --- a/spec/gemfiles/Gemfile.rails60 +++ b/spec/gemfiles/Gemfile.rails60 @@ -5,3 +5,4 @@ gemspec path: '../../' gem 'activerecord', '~> 6.0' gem 'pg' gem 'mongoid' +gem 'chronic' diff --git a/spec/gemfiles/Gemfile.rails61 b/spec/gemfiles/Gemfile.rails61 index 5d8ef71..3663f55 100644 --- a/spec/gemfiles/Gemfile.rails61 +++ b/spec/gemfiles/Gemfile.rails61 @@ -5,3 +5,4 @@ gemspec path: '../../' gem 'activerecord', '~> 6.1' gem 'pg' gem 'mongoid' +gem 'chronic' diff --git a/spec/gemfiles/Gemfile.rails32 b/spec/gemfiles/Gemfile.rails70 similarity index 52% rename from spec/gemfiles/Gemfile.rails32 rename to spec/gemfiles/Gemfile.rails70 index de035ad..b78d557 100644 --- a/spec/gemfiles/Gemfile.rails32 +++ b/spec/gemfiles/Gemfile.rails70 @@ -2,6 +2,7 @@ source 'http://rubygems.org' gemspec path: '../../' -gem 'activerecord', '~> 3.2.0' -gem 'pg', '~> 0.11' +gem 'activerecord', '~> 7.0' +gem 'pg' gem 'mongoid' +gem 'chronic'