2021-08-06 12:28:56 -04:00
|
|
|
name: build
|
2021-05-02 02:34:29 -04:00
|
|
|
|
|
|
|
on:
|
|
|
|
- push
|
|
|
|
- pull_request
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
services:
|
|
|
|
postgresql:
|
|
|
|
image: postgres:9.6
|
|
|
|
ports:
|
|
|
|
- 5432:5432
|
|
|
|
env:
|
|
|
|
POSTGRES_PASSWORD: postgres
|
|
|
|
strategy:
|
|
|
|
fail-fast: true
|
2022-01-10 06:14:12 -05:00
|
|
|
|
2021-05-02 02:34:29 -04:00
|
|
|
matrix:
|
2022-01-23 08:45:32 -05:00
|
|
|
ruby_version: ['3.1', '3.0', '2.7', '2.6', '2.5', 'jruby']
|
2022-01-10 07:00:42 -05:00
|
|
|
rails_version: [edge, '7.0', '6.1', '6.0', '5.2']
|
2022-01-10 06:14:12 -05:00
|
|
|
db: ['sqlite3', 'postgresql', 'mysql']
|
|
|
|
|
2021-05-02 02:34:29 -04:00
|
|
|
exclude:
|
2022-01-09 21:17:26 -05:00
|
|
|
- ruby_version: '3.1'
|
2022-01-10 07:00:42 -05:00
|
|
|
rails_version: '6.0'
|
2022-01-09 21:17:26 -05:00
|
|
|
- ruby_version: '3.1'
|
2022-01-10 07:00:42 -05:00
|
|
|
rails_version: '5.2'
|
2021-05-04 15:14:34 -04:00
|
|
|
- ruby_version: '3.0'
|
2022-01-10 07:00:42 -05:00
|
|
|
rails_version: '5.2'
|
2021-05-02 02:34:29 -04:00
|
|
|
- ruby_version: '2.7'
|
2022-01-10 07:00:42 -05:00
|
|
|
rails_version: '5.2'
|
2021-05-02 02:34:29 -04:00
|
|
|
- ruby_version: '2.6'
|
2022-01-10 07:00:42 -05:00
|
|
|
rails_version: 'edge'
|
2021-12-19 10:45:23 -05:00
|
|
|
- ruby_version: '2.6'
|
2022-01-10 07:00:42 -05:00
|
|
|
rails_version: '7.0'
|
2021-05-02 02:34:29 -04:00
|
|
|
- ruby_version: '2.5'
|
2022-01-10 07:00:42 -05:00
|
|
|
rails_version: 'edge'
|
2021-12-19 10:45:23 -05:00
|
|
|
- ruby_version: '2.5'
|
2022-01-10 07:00:42 -05:00
|
|
|
rails_version: '7.0'
|
2022-01-23 08:45:32 -05:00
|
|
|
- ruby_version: 'jruby'
|
2022-01-10 07:00:42 -05:00
|
|
|
rails_version: 'edge'
|
2022-01-10 06:14:12 -05:00
|
|
|
|
2021-05-02 02:34:29 -04:00
|
|
|
include:
|
|
|
|
- ruby_version: 'ruby-head'
|
2022-01-10 07:00:42 -05:00
|
|
|
rails_version: 'edge'
|
2021-05-04 15:05:52 -04:00
|
|
|
db: sqlite3
|
2021-05-04 15:08:08 -04:00
|
|
|
- ruby_version: 'ruby-head'
|
2022-01-10 07:00:42 -05:00
|
|
|
rails_version: 'edge'
|
2021-05-04 15:08:08 -04:00
|
|
|
db: postgresql
|
|
|
|
- ruby_version: 'ruby-head'
|
2022-01-10 07:00:42 -05:00
|
|
|
rails_version: 'edge'
|
2021-05-04 15:08:08 -04:00
|
|
|
db: mysql
|
2022-01-10 06:14:12 -05:00
|
|
|
|
2022-01-10 06:24:09 -05:00
|
|
|
- ruby_version: '2.6'
|
2022-01-10 07:00:42 -05:00
|
|
|
rails_version: '5.1'
|
2022-01-10 06:24:09 -05:00
|
|
|
db: sqlite3
|
2022-01-10 06:21:03 -05:00
|
|
|
- ruby_version: '2.6'
|
2022-01-10 07:00:42 -05:00
|
|
|
rails_version: '5.0'
|
2022-01-10 06:21:03 -05:00
|
|
|
db: sqlite3
|
|
|
|
|
2022-01-10 06:24:09 -05:00
|
|
|
- ruby_version: '2.5'
|
2022-01-10 07:00:42 -05:00
|
|
|
rails_version: '5.1'
|
2022-01-10 06:24:09 -05:00
|
|
|
db: sqlite3
|
2022-01-10 06:21:03 -05:00
|
|
|
- ruby_version: '2.5'
|
2022-01-10 07:00:42 -05:00
|
|
|
rails_version: '5.0'
|
2022-01-10 06:21:03 -05:00
|
|
|
db: sqlite3
|
|
|
|
|
2021-05-04 11:45:17 -04:00
|
|
|
- ruby_version: '2.4'
|
2022-01-10 07:00:42 -05:00
|
|
|
rails_version: '5.2'
|
2021-05-04 11:45:17 -04:00
|
|
|
db: sqlite3
|
2022-01-10 06:14:12 -05:00
|
|
|
|
2021-05-04 09:05:22 -04:00
|
|
|
- ruby_version: '2.3'
|
2022-01-10 07:00:42 -05:00
|
|
|
rails_version: '5.2'
|
2021-05-04 09:05:22 -04:00
|
|
|
db: sqlite3
|
2021-05-04 12:03:09 -04:00
|
|
|
- ruby_version: '2.3'
|
2022-01-10 07:00:42 -05:00
|
|
|
rails_version: '4.2'
|
2021-05-04 12:03:09 -04:00
|
|
|
db: sqlite3
|
2021-05-04 11:55:04 -04:00
|
|
|
- ruby_version: '2.3'
|
2022-01-10 07:00:42 -05:00
|
|
|
rails_version: '4.1'
|
2021-05-04 11:55:04 -04:00
|
|
|
db: sqlite3
|
2022-01-10 06:14:12 -05:00
|
|
|
|
2021-05-02 02:34:29 -04:00
|
|
|
- ruby_version: '2.2'
|
2022-01-10 07:00:42 -05:00
|
|
|
rails_version: '5.2'
|
2021-05-02 02:34:29 -04:00
|
|
|
db: sqlite3
|
2022-01-10 06:14:12 -05:00
|
|
|
|
2021-05-02 02:34:29 -04:00
|
|
|
- ruby_version: '2.1'
|
2022-01-10 07:00:42 -05:00
|
|
|
rails_version: '4.2'
|
2021-05-02 02:34:29 -04:00
|
|
|
db: sqlite3
|
2022-01-10 06:14:12 -05:00
|
|
|
|
2021-05-02 02:34:29 -04:00
|
|
|
env:
|
2022-01-10 07:00:42 -05:00
|
|
|
RAILS_VERSION: ${{ matrix.rails_version }}
|
2021-05-02 02:34:29 -04:00
|
|
|
DB: ${{ matrix.db }}
|
2021-05-04 21:40:57 -04:00
|
|
|
POSTGRES_PASSWORD: postgres # for passing the password to the Rails process
|
2021-05-05 00:19:53 -04:00
|
|
|
MYSQL_PASSWORD: root # for passing the password to the Rails process
|
2022-01-10 06:14:12 -05:00
|
|
|
|
|
|
|
runs-on: ubuntu-18.04
|
|
|
|
|
2021-05-02 02:34:29 -04:00
|
|
|
steps:
|
2022-06-23 22:36:32 -04:00
|
|
|
- uses: actions/checkout@v3
|
2021-08-06 10:58:58 -04:00
|
|
|
- name: Install libmysqld-dev
|
|
|
|
run: sudo apt-get install libmysqld-dev
|
2021-05-02 02:34:29 -04:00
|
|
|
- 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
|
2022-01-23 08:45:32 -05:00
|
|
|
continue-on-error: ${{ (matrix.ruby_version == 'ruby-head') || (matrix.ruby_version == 'jruby') || (matrix.rails_version == 'edge') }}
|
2021-05-02 02:34:29 -04:00
|
|
|
- run: bundle exec rake test
|
2022-01-23 08:45:32 -05:00
|
|
|
continue-on-error: ${{ (matrix.ruby_version == 'ruby-head') || (matrix.ruby_version == 'jruby') || (matrix.rails_version == 'edge') }}
|