Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 26 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,18 @@ on:
- cron: "0 18 * * 6" # Saturdays at 12pm CST
workflow_dispatch:

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
test:
name: Ruby ${{ matrix.ruby-version }} / Active Record ${{ matrix.active-record.label }}
runs-on: ubuntu-latest
timeout-minutes: 20
services:
postgres:
image: postgres:latest
Expand All @@ -32,45 +41,47 @@ jobs:
CI: true
PGHOST: 127.0.0.1
PGUSER: postgres
PGPASS: postgres
strategy:
fail-fast: false
matrix:
ruby-version: ["3.3", "3.4", "4.0"]
active-record-version-env:
- ACTIVE_RECORD_VERSION="~> 7.2.0"
- ACTIVE_RECORD_VERSION="~> 8.0.0"
- ACTIVE_RECORD_VERSION="~> 8.1.0"
active-record:
- { label: "7.2", env: "ACTIVE_RECORD_VERSION=~> 7.2.0" }
- { label: "8.0", env: "ACTIVE_RECORD_VERSION=~> 8.0.0" }
- { label: "8.1", env: "ACTIVE_RECORD_VERSION=~> 8.1.0" }
allow-failure: [false]
include:
- ruby-version: "ruby-head"
active-record-version-env: ACTIVE_RECORD_VERSION="~> 8.1.0"
allow-failure: true
- ruby-version: "4.0"
active-record-version-env: ACTIVE_RECORD_BRANCH="main"
active-record: { label: "main", env: "ACTIVE_RECORD_BRANCH=main" }
allow-failure: true
- ruby-version: "4.0"
active-record-version-env: ACTIVE_RECORD_BRANCH="8-1-stable"
active-record: { label: "8-1-stable", env: "ACTIVE_RECORD_BRANCH=8-1-stable" }
allow-failure: true
- ruby-version: "4.0"
active-record-version-env: ACTIVE_RECORD_BRANCH="8-0-stable"
active-record: { label: "8-0-stable", env: "ACTIVE_RECORD_BRANCH=8-0-stable" }
allow-failure: true
- ruby-version: "4.0"
active-record-version-env: ACTIVE_RECORD_BRANCH="7-2-stable"
active-record: { label: "7-2-stable", env: "ACTIVE_RECORD_BRANCH=7-2-stable" }
allow-failure: true
- ruby-version: "ruby-head"
active-record: { label: "8.1", env: "ACTIVE_RECORD_VERSION=~> 8.1.0" }
allow-failure: true
continue-on-error: ${{ matrix.allow-failure }}
steps:
- uses: actions/checkout@v6
- name: Select ActiveRecord version
env:
ACTIVE_RECORD_ENV: ${{ matrix.active-record.env }}
run: echo "$ACTIVE_RECORD_ENV" >> "$GITHUB_ENV"
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true
cache-version: ${{ matrix.active-record.env }}
- name: Set up test database
env:
PGPASSWORD: postgres
run: createdb pg_search_test
- name: Update bundle
run: ${{ matrix.active-record-version-env }} bundle update
- name: Run tests
run: ${{ matrix.active-record-version-env }} bundle exec rake
run: bundle exec rake
Loading