Introduce integration tests using real MySQL and PostgreSQL #3
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Integration Test | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
start_dbs: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./integration_test | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Start DBs | |
run: docker compose up -d | |
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: 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 |