1
0
Fork 0
mirror of https://github.com/kaminari/kaminari.git synced 2022-11-09 13:44:37 -05:00
kaminari--kaminari/.github/workflows/main.yml
Akira Matsuda 26e3406a33 Integrate gemfiles/*.gemfile into Gemfile
and switch Rails version via envvar
2022-01-10 21:01:19 +09:00

112 lines
3.1 KiB
YAML

name: build
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: ['3.1', '3.0', '2.7', '2.6', '2.5', 'jruby-9.3.2.0']
rails_version: [edge, '7.0', '6.1', '6.0', '5.2']
db: ['sqlite3', 'postgresql', 'mysql']
exclude:
- ruby_version: '3.1'
rails_version: '6.0'
- ruby_version: '3.1'
rails_version: '5.2'
- ruby_version: '3.0'
rails_version: '5.2'
- ruby_version: '2.7'
rails_version: '5.2'
- ruby_version: '2.6'
rails_version: 'edge'
- ruby_version: '2.6'
rails_version: '7.0'
- ruby_version: '2.5'
rails_version: 'edge'
- ruby_version: '2.5'
rails_version: '7.0'
- ruby_version: 'jruby-9.3.2.0'
rails_version: 'edge'
include:
- ruby_version: 'ruby-head'
rails_version: 'edge'
db: sqlite3
- ruby_version: 'ruby-head'
rails_version: 'edge'
db: postgresql
- ruby_version: 'ruby-head'
rails_version: 'edge'
db: mysql
- ruby_version: '2.6'
rails_version: '5.1'
db: sqlite3
- ruby_version: '2.6'
rails_version: '5.0'
db: sqlite3
- ruby_version: '2.5'
rails_version: '5.1'
db: sqlite3
- ruby_version: '2.5'
rails_version: '5.0'
db: sqlite3
- ruby_version: '2.4'
rails_version: '5.2'
db: sqlite3
- ruby_version: '2.3'
rails_version: '5.2'
db: sqlite3
- ruby_version: '2.3'
rails_version: '4.2'
db: sqlite3
- ruby_version: '2.3'
rails_version: '4.1'
db: sqlite3
- ruby_version: '2.2'
rails_version: '5.2'
db: sqlite3
- ruby_version: '2.1'
rails_version: '4.2'
db: sqlite3
env:
RAILS_VERSION: ${{ matrix.rails_version }}
DB: ${{ matrix.db }}
POSTGRES_PASSWORD: postgres # for passing the password to the Rails process
MYSQL_PASSWORD: root # for passing the password to the Rails process
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- name: Install libmysqld-dev
run: sudo apt-get install libmysqld-dev
- 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
continue-on-error: ${{ (matrix.ruby_version == 'ruby-head') || (matrix.ruby_version == 'jruby-9.3.2.0') || (matrix.rails_version == 'edge') }}
- run: bundle exec rake test
continue-on-error: ${{ (matrix.ruby_version == 'ruby-head') || (matrix.ruby_version == 'jruby-9.3.2.0') || (matrix.rails_version == 'edge') }}