Skip to content

Introduce integration tests using real MySQL and PostgreSQL #4

Introduce integration tests using real MySQL and PostgreSQL

Introduce integration tests using real MySQL and PostgreSQL #4

name: Integration Test
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
integration_test:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./integration_test
env:
MYSQL_HOST: 127.0.0.1
POSTGRES_HOST: 127.0.0.1
strategy:
matrix:
adapter:
- mysql2
- postgresql
gemfile:
- ar_6.1
- ar_7.0
- ar_7.1
steps:
- uses: actions/checkout@v2
- name: Start DBs
run: docker compose up -d
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.3
- name: Run bundle install
env:
BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
run: bundle install
- name: Run integration test
env:
BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
run: bundle exec rspec spec/${{ matrix.adapter }}_spec.rb