Skip to content

check

check #227

Workflow file for this run

name: check
on:
push:
pull_request:
schedule:
- cron: 45 4 * * 4
jobs:
check:
runs-on: ubuntu-latest
container: "${{ matrix.container }}"
strategy:
matrix:
container:
- ruby:1.9
- ruby:2.0
- ruby:2.1
- ruby:2.2
- ruby:2.3
- ruby:2.4
- ruby:2.5
- ruby:2.6
- ruby:2.7
- ruby:3.0
- ruby:3.1
- ruby:3.2
- jruby:9.3
- jruby:9.4
fail-fast: false
services:
mysql:
image: mysql:5.7
env:
MYSQL_USER: mysql
MYSQL_PASSWORD: mysql
MYSQL_DATABASE: dump_test
MYSQL_ROOT_PASSWORD: password
options: --health-cmd "mysqladmin ping" --health-interval 10s --health-timeout 5s --health-retries 3
postgres:
image: postgres:9.4
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: dump_test
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- uses: actions/checkout@v3
- run: which git || (apt update && apt -y install git)
- run: git init
- if: ${{ matrix.container >= 'ruby:1.9' && matrix.container < 'ruby:2.3' }}
run: |
echo "gem: --no-ri --no-rdoc --no-document" > ~/.gemrc
gem install rubygems-update --version '< 3'
update_rubygems
gem install bundler --version '< 2'
- run: |
tee spec/db/database.yml << YAML
sqlite3:
adapter: sqlite3
database: ':memory:'
mysql:
adapter: mysql2
host: mysql
database: dump_test
username: mysql
password: mysql
encoding: utf8
postgresql:
adapter: postgresql
host: postgres
database: dump_test
username: postgres
password: postgres
YAML
- run: bundle install --jobs=3 --retry=3
- run: RUBYOPT=-rset bundle exec appraisal install --jobs=3 --retry=3
- run: bundle exec appraisal rspec