Skip to content

Complete project submission #23

Complete project submission

Complete project submission #23

Workflow file for this run

name: RSpec
on: [pull_request]
jobs:
build:
runs-on: ubuntu-latest
services:
db:
image: postgres:13
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: test_database
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: 3.2.2
bundler-cache: true
- name: Precompile assets
env:
RAILS_ENV: test
DATABASE_URL: postgres://postgres:postgres@localhost/test_database
run: |
gem install bundler
bundle install --jobs 4 --retry 3
bundle exec rails assets:precompile
- name: Build and test with Rake
env:
RAILS_ENV: test
DATABASE_URL: postgres://postgres:postgres@localhost/test_database
run: |
bundle exec rails db:create db:schema:load
bundle exec rspec