Skip to content

Add Appraisal

Add Appraisal #314

Workflow file for this run

name: CI
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Ruby and gems
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.4
bundler-cache: true
- name: Run Rubocop
run: bin/rubocop
test:
runs-on: ubuntu-latest
name: Ruby ${{ matrix.ruby }} (${{ matrix.appraisal }})
strategy:
matrix:
ruby: ["3.1", "3.2", "3.3", "3.4"]
appraisal: ["rails_7.1", "rails_7.2", "rails_8.0", "rails_8.1"]
exclude:
- ruby: "3.1"
appraisal: "rails_8.0"
- ruby: "3.1"
appraisal: "rails_8.1"
services:
postgres:
image: postgres:17
env:
POSTGRES_DB: active_fields_dummy_test
PGUSER: postgres # Fixes 'FATAL: role "root" does not exist'
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports: ["5432:5432"]
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
RAILS_ENV: test
CI: true
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Ruby and gems
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
env:
BUNDLE_GEMFILE: gemfiles/${{ matrix.appraisal }}.gemfile
- name: Set up Dummy
run: spec/dummy/bin/setup
env:
BUNDLE_GEMFILE: gemfiles/${{ matrix.appraisal }}.gemfile
- name: Run tests
run: bin/rspec
env:
BUNDLE_GEMFILE: gemfiles/${{ matrix.appraisal }}.gemfile
- name: Run tests with customization
run: bin/rspec
env:
CHANGE_FIELD_BASE_CLASS: true
CHANGE_VALUE_CLASS: true
BUNDLE_GEMFILE: gemfiles/${{ matrix.appraisal }}.gemfile