Skip to content

Experimental Trilogy support #80

Experimental Trilogy support

Experimental Trilogy support #80

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ruby:
- '3.2'
name: Ruby ${{ matrix.ruby }}
services:
mysql:
image: mysql:5.7
env:
MYSQL_DATABASE: test
MYSQL_ROOT_PASSWORD: password
MYSQL_USER: test
MYSQL_PASSWORD: test_password
ports:
- 3306:3306
options: >-
--health-cmd "mysqladmin ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- run: |
mysql -e "CREATE USER 'replica'@'%' IDENTIFIED WITH mysql_native_password BY 'replica_password';" -u${{ env.DB_USER }} -p${{ env.DB_PASSWORD }}
mysql -e "GRANT SELECT ON test.* TO 'replica'@'%'" -u${{ env.DB_USER }} -p${{ env.DB_PASSWORD }}
mysql -e "CREATE USER 'primary'@'%' IDENTIFIED WITH mysql_native_password BY 'primary_password';" -u${{ env.DB_USER }} -p${{ env.DB_PASSWORD }}
mysql -e "GRANT ALL PRIVILEGES ON *.* TO 'primary'@'%';" -u${{ env.DB_USER }} -p${{ env.DB_PASSWORD }}
mysql -e "FLUSH PRIVILEGES;" -u${{ env.DB_USER }} -p${{ env.DB_PASSWORD }}
- run: |
bundle exec rspec
env:
MYSQL_HOST: 127.0.0.1
RAILS_ENV: test
RuboCop:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2'
bundler-cache: true
- run: |
bundle exec rubocop --parallel --color