Skip to content

add db ci

add db ci #2

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:16
ports:
- 5432:5432
env:
POSTGRES_DB: pirate_app_test
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
steps:
- uses: actions/checkout@v2
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.3.0
- name: Install dependencies
run: |
gem install bundler
bundle install
- name: Set up database
run: |
cp config/database.yml.ci config/database.yml
bundle exec rails db:create db:schema:load
- name: Run tests
run: bundle exec rspec