Skip to content

chore: ensure test db is safely/freshly created #224

chore: ensure test db is safely/freshly created

chore: ensure test db is safely/freshly created #224

Workflow file for this run

name: CI
on:
push:
branches: [ 'master', 'release-0-8', 'release-0-9', 'release-0-10', 'v0-11-dev' ]
pull_request:
branches: ['**']
jobs:
tests:
runs-on: ubuntu-latest
services:
mysql:
image: mysql
env:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: test
ports:
- 3306:3306
options: >-
--health-cmd "mysqladmin ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
postgres:
image: postgres
env:
POSTGRES_PASSWORD: password
POSTGRES_DB: test
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
strategy:
fail-fast: false
matrix:
ruby:
- '3.3'
- '3.2'
- '3.1'
- '3.0'
rails:
- '7.1'
- '7.0'
- '6.1'
database_url:
- sqlite3:jr_test
- postgresql://postgres:password@localhost:5432/jr_test
- mysql2://root:[email protected]:3306/jr_test
# exclude:
# - ruby: '3.1'
# rails: '6.0'
env:
RAILS_VERSION: ${{ matrix.rails }}
DATABASE_URL: ${{ matrix.database_url }}
name: Ruby ${{ matrix.ruby }} Rails ${{ matrix.rails }} DB ${{ matrix.database_url }}
steps:
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Run tests
run: bundle exec rake