Skip to content

Switch to rubocop-rails-omakase for styles #72

Switch to rubocop-rails-omakase for styles

Switch to rubocop-rails-omakase for styles #72

Workflow file for this run

name: Build
on: [push]
jobs:
rubocop:
name: Rubocop
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Ruby and install gems
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7.2
bundler-cache: true
- name: Run rubocop
run: |
bundle exec rubocop --parallel
tests:
name: Tests
runs-on: ubuntu-latest
strategy:
matrix:
database: [sqlite, postgres, mysql]
services:
postgres:
image: postgres:13.4
env:
POSTGRES_HOST_AUTH_METHOD: "trust"
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 55433:5432
mysql:
image: percona:5.7.22
env:
MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
options: >-
--health-cmd "mysqladmin ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 33307:3306
env:
TARGET_DB: ${{ matrix.database }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Ruby and install gems
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7.2
bundler-cache: true
- name: Setup test database
env:
RAILS_ENV: test
run: bin/rails db:setup
- name: Run tests
run: bundle exec rake test