Skip to content

Instantly share code, notes, and snippets.

@ignaciojonas
Created February 26, 2021 19:38
Show Gist options
  • Save ignaciojonas/8f8077814ff7e269d0fe9c4ad282f267 to your computer and use it in GitHub Desktop.
Save ignaciojonas/8f8077814ff7e269d0fe9c4ad282f267 to your computer and use it in GitHub Desktop.
name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
rspec:
name: Rspec
runs-on: ubuntu-latest
services:
postgres:
image: postgres:11
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
env:
POSTGRES_HOST: 127.0.0.1
steps:
- uses: actions/checkout@v2
- uses: actions/setup-ruby@v1
with:
ruby-version: 2.7.2
- name: Install Dependencies
run: |
gem install bundler
bundle install
- name: Run Migrations
run: bundle exec rails db:create db:migrate RAILS_ENV=test
- name: Run Rspec
run: bundle exec rspec
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment