Skip to content

create db users before run #10

create db users before run

create db users before run #10

Workflow file for this run

name: RSpec Test Matrix
on:
push:
pull_request:
jobs:
test:
runs-on: ubuntu-latest
services:
postgresql:
image: postgres
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
POSTGRES_DB: test_active_record_union
POSTGRES_USER: active_record_union
POSTGRES_PASSWORD: active_record_union
mysql2:
image: mysql:8.0
env:
MYSQL_ROOT_HOST: "%"
MYSQL_DB: test_active_record_union
MYSQL_USER: active_record_union
MYSQL_PASSWORD: active_record_union
MYSQL_ROOT_PASSWORD: active_record_union
options: >-
--health-cmd "mysqladmin ping"
--health-interval 10s
--health-timeout 5s
ports:
- "3306:3306"
strategy:
fail-fast: false
matrix:
# just define specific versions for each rails version
include:
- ruby: 2.6
rails: 5.2
- ruby: 2.6
rails: "6.0"
- ruby: "3.0"
rails: 6.1
- ruby: 3.1
rails: "7.0"
- ruby: 3.2
rails: 7.1
- ruby: 3.2
rails: 7.2
- ruby: 3.3
rails: "8.0"
env:
BUNDLE_GEMFILE: "rails_${{ matrix.rails }}.gemfile"
DB_HOST: 127.0.0.1
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true # install gems and cache
- run: bin/create-db-users
- run: bundle exec rspec --force-color --format d