Do not require unnecessary components #14
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Ruby | |
on: | |
push: | |
branches: | |
- main | |
- 'releases/*' | |
pull_request: | |
branches: | |
- main | |
- 'releases/*' | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
services: | |
postgres: | |
image: postgres:latest | |
ports: | |
- 5432:5432 | |
env: | |
POSTGRES_DB: rails_bump_test | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
options: >- | |
--health-cmd="pg_isready -U postgres" | |
--health-interval=10s | |
--health-timeout=5s | |
--health-retries=5 | |
env: | |
HOST: localhost | |
REDIS_HOST: localhost:6379 | |
DATABASE_URL: postgres://postgres:postgres@localhost:5432/rails_bump_test | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
- name: Install dependencies | |
run: bundle install | |
- name: Set up the database | |
run: | | |
bin/rails db:create | |
bin/rails db:schema:load | |
bin/rails db:test:prepare | |
- name: Run tests | |
run: bundle exec rspec spec |