Skip to content

Fixes #411 Wrap job invocation in Rails executor when using ActiveRecord #444

Fixes #411 Wrap job invocation in Rails executor when using ActiveRecord

Fixes #411 Wrap job invocation in Rails executor when using ActiveRecord #444

Workflow file for this run

name: tests
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
ruby_version: ['2.7', '3.0', '3.1', '3.2']
rails_gemfile: ['6.0', '6.1', '7.0', '7.1']
postgres_version: ['14']
include:
# Postgres versions
- { ruby_version: '3.2', rails_gemfile: '7.1', postgres_version: '9' }
- { ruby_version: '3.2', rails_gemfile: '7.1', postgres_version: '10' }
- { ruby_version: '3.2', rails_gemfile: '7.1', postgres_version: '11' }
- { ruby_version: '3.2', rails_gemfile: '7.1', postgres_version: '12' }
- { ruby_version: '3.2', rails_gemfile: '7.1', postgres_version: '13' }
- { ruby_version: '3.2', rails_gemfile: '7.1', postgres_version: '14' }
exclude: []
name: "Test: Ruby ${{ matrix.ruby_version }}, Rails ${{ matrix.rails_gemfile }}, PostgreSQL ${{ matrix.postgres_version }}"
services:
db:
image: postgres:${{ matrix.postgres_version }}
env:
POSTGRES_HOST_AUTH_METHOD: trust
ports: ['5432:5432']
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v2
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby_version }}
- name: Test with Rake
env:
PGHOST: 127.0.0.1
PGUSER: postgres
BUNDLE_GEMFILE: spec/gemfiles/Gemfile-rails-${{ matrix.rails_gemfile }}
run: |
sudo apt-get -yqq install libpq-dev postgresql-client
createdb que-test
gem install bundler --version '~> 2.4.22'
bundle install --jobs 4 --retry 3
USE_RAILS=true bundle exec rake test
bundle exec rake test