Skip to content

Merge pull request #361 from interagent/bf/sinatra-4 #95

Merge pull request #361 from interagent/bf/sinatra-4

Merge pull request #361 from interagent/bf/sinatra-4 #95

Workflow file for this run

name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test:
name: "Ruby ${{ matrix.ruby-version }} ActiveSupport: ${{matrix.activesupport-version}} Sinatra ${{matrix.sinatra-version}}"
runs-on: ubuntu-latest
strategy:
matrix:
ruby-version: ['3.0', '3.1', '3.2']
activesupport-version: ['6', '7']
sinatra-version: ['2', '3', '4']
env:
ACTIVESUPPORT_MAJOR: ${{ matrix.activesupport-version }}
SINATRA_MAJOR: ${{ matrix.sinatra-version }}
services:
postgres:
image: postgres
env:
POSTGRES_PASSWORD: password
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
ports:
- 5432:5432
steps:
- uses: actions/checkout@v2
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true
- run: PGPASSWORD=password psql -U postgres -h localhost -c 'CREATE DATABASE plinygemtest;'
- run: PGPASSWORD=password psql -U postgres -h localhost -c 'CREATE DATABASE integrationtest;'
- name: Run tests
run: bundle exec rake
env:
TEST_DATABASE_URL: "postgres://postgres:password@localhost/plinygemtest"
DATABASE_URL: "postgres://postgres:password@localhost/integrationtest"