2021-05-02 02:34:29 -04:00
|
|
|
name: Ruby
|
|
|
|
|
|
|
|
on:
|
|
|
|
- push
|
|
|
|
- pull_request
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
services:
|
|
|
|
postgresql:
|
|
|
|
image: postgres:9.6
|
|
|
|
ports:
|
|
|
|
- 5432:5432
|
|
|
|
env:
|
|
|
|
POSTGRES_PASSWORD: postgres
|
|
|
|
strategy:
|
|
|
|
fail-fast: true
|
|
|
|
matrix:
|
|
|
|
ruby_version:
|
|
|
|
- '2.7'
|
|
|
|
- '2.6'
|
|
|
|
- '2.5'
|
2021-05-03 23:27:36 -04:00
|
|
|
- 'jruby-9.2.17.0'
|
2021-05-02 02:34:29 -04:00
|
|
|
gemfile:
|
|
|
|
- gemfiles/active_record_60.gemfile
|
|
|
|
- gemfiles/active_record_52.gemfile
|
|
|
|
- gemfiles/active_record_51.gemfile
|
|
|
|
- gemfiles/active_record_50.gemfile
|
|
|
|
- gemfiles/active_record_edge.gemfile
|
|
|
|
db:
|
|
|
|
- sqlite3
|
|
|
|
- postgresql
|
|
|
|
- mysql
|
|
|
|
exclude:
|
|
|
|
- ruby_version: '2.7'
|
|
|
|
gemfile: gemfiles/active_record_52.gemfile
|
|
|
|
- ruby_version: '2.7'
|
|
|
|
gemfile: gemfiles/active_record_51.gemfile
|
|
|
|
- ruby_version: '2.7'
|
|
|
|
gemfile: gemfiles/active_record_50.gemfile
|
|
|
|
- ruby_version: '2.6'
|
|
|
|
gemfile: gemfiles/active_record_edge.gemfile
|
|
|
|
- ruby_version: '2.5'
|
|
|
|
gemfile: gemfiles/active_record_edge.gemfile
|
2021-05-03 23:27:36 -04:00
|
|
|
- ruby_version: 'jruby-9.2.17.0'
|
|
|
|
gemfile: gemfiles/active_record_edge.gemfile
|
2021-05-02 02:34:29 -04:00
|
|
|
include:
|
|
|
|
- ruby_version: 'ruby-head'
|
|
|
|
gemfile: gemfiles/active_record_edge.gemfile
|
2021-05-04 15:05:52 -04:00
|
|
|
db: sqlite3
|
2021-05-04 11:45:17 -04:00
|
|
|
- ruby_version: '2.4'
|
|
|
|
gemfile: gemfiles/active_record_52.gemfile
|
|
|
|
db: sqlite3
|
2021-05-04 09:05:22 -04:00
|
|
|
- ruby_version: '2.3'
|
|
|
|
gemfile: gemfiles/active_record_52.gemfile
|
|
|
|
db: sqlite3
|
2021-05-04 12:03:09 -04:00
|
|
|
- ruby_version: '2.3'
|
|
|
|
gemfile: gemfiles/active_record_42.gemfile
|
|
|
|
db: sqlite3
|
2021-05-04 11:55:04 -04:00
|
|
|
- ruby_version: '2.3'
|
|
|
|
gemfile: gemfiles/active_record_41.gemfile
|
|
|
|
db: sqlite3
|
2021-05-02 02:34:29 -04:00
|
|
|
- ruby_version: '2.2'
|
2021-05-04 09:00:20 -04:00
|
|
|
gemfile: gemfiles/active_record_52.gemfile
|
2021-05-02 02:34:29 -04:00
|
|
|
db: sqlite3
|
|
|
|
- ruby_version: '2.1'
|
|
|
|
gemfile: gemfiles/active_record_42.gemfile
|
|
|
|
db: sqlite3
|
|
|
|
runs-on: ubuntu-16.04
|
|
|
|
env:
|
|
|
|
BUNDLE_GEMFILE: ${{ matrix.gemfile }}
|
|
|
|
DB: ${{ matrix.db }}
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Start local MySQL
|
|
|
|
run: sudo /etc/init.d/mysql start
|
|
|
|
- name: Set up Ruby
|
|
|
|
uses: ruby/setup-ruby@v1
|
|
|
|
with:
|
|
|
|
ruby-version: ${{ matrix.ruby_version }}
|
|
|
|
bundler-cache: true
|
2021-05-03 23:27:36 -04:00
|
|
|
continue-on-error: ${{ matrix.ruby_version == 'ruby-head' || matrix.ruby_version == 'jruby-9.2.17.0' || matrix.gemfile == 'gemfiles/active_record_edge.gemfile' }}
|
2021-05-02 02:34:29 -04:00
|
|
|
- run: mv kaminari-core/test/fake_app/config/database_gha.yml kaminari-core/test/fake_app/config/database.yml
|
|
|
|
- run: bundle exec rake test
|
2021-05-03 23:27:36 -04:00
|
|
|
continue-on-error: ${{ matrix.ruby_version == 'ruby-head' || matrix.ruby_version == 'jruby-9.2.17.0' || matrix.gemfile == 'gemfiles/active_record_edge.gemfile' }}
|