Skip to content

chore: Update test DB configuration for CI #101

chore: Update test DB configuration for CI

chore: Update test DB configuration for CI #101

Workflow file for this run

name: Run tests
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:14
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- uses: actions/checkout@v2
- name: Set up Ruby 3.2.2
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2.2
- name: Install dependencies
run: |
gem install bundler
bundle install --jobs 4 --retry 3
- name: Setup test database
env:
RAILS_ENV: test
DATABASE_URL: postgres://postgres:postgres@localhost:5432/pages_ahead_test
run: |
bundle exec rails db:create
bundle exec rails db:schema:load
- name: Run tests
env:
RAILS_ENV: test
run: bundle exec rspec