Skip to content

Add support for Rails 7.2, drop Ruby 3.0 and Rails 6.1 #124

Add support for Rails 7.2, drop Ruby 3.0 and Rails 6.1

Add support for Rails 7.2, drop Ruby 3.0 and Rails 6.1 #124

Workflow file for this run

name: Build
on:
push:
branches: [master]
pull_request:
jobs:
test:
name: Test
runs-on: ubuntu-latest
strategy:
matrix:
ruby-version: ["3.1", "3.2", "3.3"]
database:
- sqlite
- postgresql
- mysql
gemfile:
- Gemfile
- spec/ci/rails71.gemfile
- spec/ci/rails70.gemfile
services:
postgresql:
image: postgres:16
env:
POSTGRES_USER: postgres
POSTGRES_DB: postgres
POSTGRES_PASSWORD: postgres
ports: ["5432:5432"]
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
mysql:
image: mysql:5.7
env:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
ports: ["3306:3306"]
options: >-
--health-cmd="mysqladmin ping"
--health-interval=10s
--health-timeout=5s
--health-retries=3
env:
BUNDLE_GEMFILE: ${{ github.workspace }}/${{ matrix.gemfile }}
DB: ${{ matrix.database }}
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true
- name: Prepare database
env:
PGPASSWORD: postgres
run: |
bundle exec rake db:drop
bundle exec rake db:create
- name: Run tests
run: bundle exec rake
- name: Report to coveralls
if: |
github.repository == 'joshwlewis/validates_by_schema' &&
matrix.gemfile == 'Gemfile' &&
matrix.ruby-version == '3.2' &&
matrix.database == 'postgresql'
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: "./coverage/lcov.info"