Skip to content

Rename previous shard column to avoid conflict (#48) #122

Rename previous shard column to avoid conflict (#48)

Rename previous shard column to avoid conflict (#48) #122

name: Continuous Integration
on:
push:
branches: [ main ]
pull_request:
branches: [ '**' ]
jobs:
test:
name: Run tests (Ruby ${{ matrix.ruby }}, ${{ matrix.lockfile }})
runs-on: ubuntu-latest
env:
BUNDLE_LOCKFILE: ${{ matrix.lockfile }}
RAILS_ENV: test
DB_HOST: localhost
DB_USERNAME: postgres
DB_PASSWORD: postgres
strategy:
fail-fast: false
matrix:
ruby: ['3.2', '3.3', '3.4']
lockfile: ['activerecord-7.1', 'activerecord-7.2', 'Gemfile.lock']
services:
postgres:
image: postgres:13
env:
POSTGRES_PASSWORD: postgres
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: Set up database
run: bin/rake db:create db:migrate
- name: Run tests
run: bin/rspec
lint:
name: Run linters
runs-on: ubuntu-latest
env:
BUNDLE_LOCKFILE: Gemfile.lock
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2
bundler-cache: true
- name: Run RuboCop
run: bin/rubocop --format github