Skip to content

Introduce integration tests using real MySQL and PostgreSQL #7

Introduce integration tests using real MySQL and PostgreSQL

Introduce integration tests using real MySQL and PostgreSQL #7

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