Skip to content

Merge pull request #101 from skojin/patch-1 #175

Merge pull request #101 from skojin/patch-1

Merge pull request #101 from skojin/patch-1 #175

Workflow file for this run

name: Ruby
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
name: Ruby ${{ matrix.ruby }}
strategy:
matrix:
ruby: ['2.7', '3.0', '3.1', '3.2', '3.3']
services:
postgres:
image: postgres
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
rubygems: 3.4.22
- name: Install PostgreSQL client
run: |
sudo apt-get -yqq install libpq-dev
- name: Build app
env:
PGHOST: localhost
PGUSER: postgres
PGPASSWORD: postgres
RAILS_ENV: test
run: |
pushd spec/apps/dummy
bundle exec rake db:create db:schema:load db:migrate
popd
- name: Run tests
env:
PGHOST: localhost
PGUSER: postgres
PGPASSWORD: postgres
RAILS_ENV: test
run: bundle exec rspec --backtrace