Skip to content

CI

CI #23

Workflow file for this run

name: Test
on:
- push
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ruby_version:
- '2.7'
- '3.0'
- '3.1'
- '3.2'
- '3.3'
gemfile:
- active_record-6.0
- active_record-7.0
name: "${{ matrix.gemfile }} on Ruby ${{ matrix.ruby_version }}"
services:
db:
image: mariadb:10
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
ports:
- 3306:3306
env:
MYSQL_DATABASE: archiving_test
MYSQL_ALLOW_EMPTY_PASSWORD: 1
env:
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile
RAILS_ENV: test
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby_version }}
bundler-cache: true
- name: Set up database
working-directory: test/dummy
run: bundle exec rake db:migrate
- name: Run tests
run: bundle exec rake test