Skip to content

Support ActiveRecord 7.2 #48

Support ActiveRecord 7.2

Support ActiveRecord 7.2 #48

Workflow file for this run

name: Test and Release
on:
pull_request:
push:
paths:
- .github/**
- lib/**
- spec/**
- Gemfile
- Rakefile
- compose.yml
- replica_pools.gemspec
release:
types:
- published
jobs:
test:
name: Test
runs-on: ubuntu-latest
strategy:
matrix:
ruby:
- "2.7"
- "3.1"
- "3.2"
- "3.3"
activerecord:
- "7.1"
- "7.2"
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
- run: docker compose up --detach
- run: bundle install --jobs 4 --retry 3
- run: bundle exec rake bootstrap
- run: bundle exec rake spec
push:
name: Publish Gem
if: ${{ github.event.release }}
needs:
- test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
with:
ruby-version: "3.3"
# The kickstarter/actions/setup-rubygems action is not available
# because this is a public repo
- name: setup-rubygems
run: |
mkdir -p ~/.gem
cat <<-YAML > ~/.gem/credentials
---
:rubygems_api_key: ${{ secrets.RUBYGEMS_API_KEY }}
YAML
chmod 0600 ~/.gem/credentials
- run: ACTIVE_RECORD_VERSION=${{ matrix.activerecord }} bundle install
- run: bundle exec rake release