dawarich/.circleci/config.yml

40 lines
860 B
YAML
Raw Normal View History

2024-08-20 16:14:29 -04:00
version: 2.1
orbs:
ruby: circleci/ruby@2.1.1
jobs:
test:
2024-08-20 16:14:29 -04:00
docker:
2024-08-20 16:17:19 -04:00
- image: cimg/ruby:3.2.3
environment:
RAILS_ENV: test
2024-08-20 16:24:17 -04:00
- image: circleci/postgres:13.3
environment:
POSTGRES_USER: postgres
POSTGRES_DB: test_database
POSTGRES_PASSWORD: mysecretpassword
2024-08-20 16:28:29 -04:00
- image: redis:7.0 # Add Redis service
2024-08-20 16:14:29 -04:00
steps:
- checkout
- run:
name: Install Bundler
command: gem install bundler
- run:
name: Bundle Install
command: bundle install --jobs=4 --retry=3
- run:
name: Database Setup
command: |
bundle exec rails db:create
bundle exec rails db:schema:load
- run:
name: Run RSpec tests
command: bundle exec rspec
2024-08-20 16:14:29 -04:00
workflows:
rspec:
2024-08-20 16:14:29 -04:00
jobs:
- test