Skip to content

Commit

Permalink
Test against multiple PostgreSQL versions
Browse files Browse the repository at this point in the history
  • Loading branch information
tagliala committed May 4, 2024
1 parent 3654a98 commit 059d96a
Showing 1 changed file with 6 additions and 16 deletions.
22 changes: 6 additions & 16 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,11 @@ jobs:
name: Ruby specs
runs-on: ubuntu-latest

services:
db:
image: postgres:12
ports: ['5432:5432']
env:
POSTGRES_HOST_AUTH_METHOD: trust

options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
strategy:
matrix:
ruby-version: ['3.0', '3.1', '3.2', '3.3']
gemfile: [rails_7.0, rails_7.1]
postgres-version: ['12', '16']
channel: ['stable']

include:
Expand Down Expand Up @@ -61,11 +49,13 @@ jobs:

steps:
- uses: actions/checkout@v4
- uses: ankane/setup-postgres@v1
with:
postgres-version: ${{ matrix.postgres-version }}
- name: Set up Database
run: |
psql -c "CREATE ROLE runner SUPERUSER LOGIN CREATEDB;" -U postgres -h localhost
psql -c "CREATE DATABASE chronomodel;" -U postgres -h localhost
psql -c "CREATE DATABASE chronomodel_railsapp;" -U postgres -h localhost
psql -c "CREATE DATABASE chronomodel;" -U runneradmin
psql -c "CREATE DATABASE chronomodel_railsapp;" -U runneradmin
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
Expand Down

0 comments on commit 059d96a

Please sign in to comment.