Last active
September 27, 2019 00:20
-
-
Save garcha/694f7da5bff57e70bc3bc834712386a6 to your computer and use it in GitHub Desktop.
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 Rails Postgesql Specs | |
on: [push] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
services: | |
db: | |
image: postgres:11 | |
ports: ['5432:5432'] | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Set up Ruby 2.6 | |
uses: actions/setup-ruby@v1 | |
with: | |
ruby-version: 2.6.x | |
- name: Setup pg gem | |
run: | | |
sudo apt-get -yqq install libpq-dev | |
- name: Check packages | |
run: | | |
yarn install --check-files | |
- name: Build and test with Rake | |
env: | |
PGHOST: 127.0.0.1 | |
RAILS_ENV: test | |
POSTGRES_USER: postgres | |
POSTGRES_DB: postgres_test | |
run: | | |
gem install bundler | |
bundle install --jobs 4 --retry 3 | |
bundle exec rails db:create | |
bundle exec rails db:migrate | |
bundle exec rspec spec |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment