Skip to content

Commit

Permalink
Add example github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
maciejb2k committed Sep 5, 2023
1 parent a6519ce commit 7ed07a1
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/rubyonrails.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: "Ruby on Rails CI"
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:15-alpine
ports:
- "5432:5432"
env:
POSTGRES_DB: rails_test
POSTGRES_USER: rails
POSTGRES_PASSWORD: password
env:
RAILS_ENV: test
DATABASE_URL: "postgres://rails:password@localhost:5432/rails_test"
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install Ruby and gems
uses: ruby/setup-ruby@55283cc23133118229fd3f97f9336ee23a179fcf # v1.146.0
with:
bundler-cache: true
- name: Set up database schema
run: bin/rails db:schema:load
- name: Run tests
run: bundle exec rspec

0 comments on commit 7ed07a1

Please sign in to comment.