Introduce integration tests using real MySQL and PostgreSQL #7
Workflow file for this run
This file contains hidden or 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: | |
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 |