Skip to content

Commit

Permalink
Adding ruby CI
Browse files Browse the repository at this point in the history
  • Loading branch information
kigster committed Feb 17, 2024
1 parent c2f4f9d commit f5b8eb0
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: RSpec
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:16.2
ports:
- 5432:5432
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries
redis:
image: redis
ports:
- 6379:6379
options: --entrypoint redis-server
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2.2
bundler-cache: true # runs 'bundle install' and caches installed gems automatically

- run: |
gem update --system || true
bundle install -j 12
- run: |
bin/rails db:create
bin/rails db:migrate
bin/rails db:test:prepare
- run: |
bundle exec rspec --format documentation

0 comments on commit f5b8eb0

Please sign in to comment.