Fix autogeneration #289
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: RSpec tests | |
on: | |
pull_request: | |
schedule: | |
- cron: '0 0 * * 0' | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
services: | |
postgres: | |
image: postgres | |
env: | |
POSTGRES_USER: root | |
POSTGRES_DB: database_consistency_test | |
POSTGRES_PASSWORD: database_consistency_password | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
ports: | |
- 5432:5432 | |
mysql: | |
image: mysql | |
env: | |
MYSQL_ROOT_HOST: "%" | |
MYSQL_ALLOW_EMPTY_PASSWORD: yes | |
MYSQL_ROOT_PASSWORD: database_consistency_password | |
MYSQL_DATABASE: database_consistency_test | |
ports: | |
- 3306:3306 | |
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 | |
env: | |
DB_HOST: 127.0.0.1 | |
DB_USER: root | |
DB_PASSWORD: database_consistency_password | |
strategy: | |
matrix: | |
include: | |
- ruby-version: '2.6' | |
gemfile: 'gemfiles/ar_4_2.gemfile' | |
- ruby-version: '2.7' | |
gemfile: 'gemfiles/ar_5_2.gemfile' | |
- ruby-version: '3.0' | |
gemfile: 'gemfiles/ar_6_0.gemfile' | |
- ruby-version: '3.1' | |
gemfile: 'gemfiles/ar_6_1.gemfile' | |
- ruby-version: '3.2' | |
gemfile: 'gemfiles/ar_7_0.gemfile' | |
- ruby-version: '3.2' | |
gemfile: 'gemfiles/ar_7_1.gemfile' | |
- ruby-version: '3.2' | |
gemfile: 'gemfiles/ar_8_0.gemfile' | |
- ruby-version: 'head' | |
gemfile: 'gemfiles/ar_main.gemfile' | |
continue-on-error: ${{ contains(matrix.ruby-version, 'head') || contains(matrix.gemfile, 'ar_main') }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Ruby ${{ matrix.ruby-version }} | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby-version }} | |
bundler-cache: true | |
- name: Use << parameters.gemfile >> as the Gemfile | |
run: bundle config --global gemfile ${{ matrix.gemfile }} | |
- name: Install dependencies | |
run: bundle install | |
- name: Run SQLite tests | |
run: bundle exec rspec | |
- name: Run MySQL tests | |
run: DATABASE=mysql bundle exec rspec | |
- name: Run PostgreSQL tests | |
run: DATABASE=postgresql bundle exec rspec |