Skip to content

Improve

Improve #16

Workflow file for this run

name: RLS
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
specs:
runs-on: ubuntu-latest
strategy:
matrix:
gemfile: [ rails_7_0, rails_7_1 ]
ruby: [ 2.7, 3.1, 3.2 ]
env:
DATABASE_URL: postgres://postgres:postgres@localhost:5432
RAILS_ENV: test
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile
services:
postgres:
image: postgres:12
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports: ['5432:5432']
steps:
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Setup database
working-directory: ./spec/dummy
run: |
bundle exec rake db:create
bundle exec rake rls:create_role
bundle exec rake db:prepare
- name: Run tests
run: bundle exec rspec --backtrace