Skip to content

Refactor model to modular concerns and add Rails 8.1 support #55

Refactor model to modular concerns and add Rails 8.1 support

Refactor model to modular concerns and add Rails 8.1 support #55

Workflow file for this run

name: Gem Tests
on:
pull_request:
push:
branches:
- master
jobs:
test:
runs-on: ubuntu-latest
name: Ruby ${{ matrix.ruby }}
strategy:
fail-fast: false
matrix:
# Testing against all major supported Ruby versions
ruby: ['4.0', '3.5', '3.4', '3.3', '3.2', '3.1', '3.0', '2.7']
services:
postgres:
image: postgres:16
env:
POSTGRES_PASSWORD: postgres
POSTGRES_DB: pg_ltree_test
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Setup DB config
run: cp spec/database.yml.sample spec/database.yml
- name: Install Appraisal dependencies
run: bundle exec appraisal install
- name: Run Tests (Appraisal)
run: bundle exec appraisal rake spec
env:
PGHOST: localhost
PGUSER: postgres
PGPASSWORD: postgres
# Dedicated job for linting to fail fast
lint:
runs-on: ubuntu-latest
name: Linting
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.4'
bundler-cache: true
- name: Run Lint
run: bundle exec rake lint