Skip to content

Switch to postgresql #16

Switch to postgresql

Switch to postgresql #16

Workflow file for this run

name: "Ruby on Rails CI"
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
test:
name: Run Unit Tests
runs-on: ubuntu-latest
services:
postgres:
image: postgres:latest
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
ports: ["5432:5432"]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Run tests
env:
DATABASE_URL: postgres://postgres:password@localhost:5432/test
RAILS_ENV: test
run: |
bin/rails test:prepare
bin/rails db:test:prepare
bin/rails test