Skip to content

Use mysql:8.0 in CI #47

Use mysql:8.0 in CI

Use mysql:8.0 in CI #47

Workflow file for this run

name: CI
on:
push:
pull_request:
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ruby:
- '2.7'
- '3.0'
- '3.1'
- '3.2'
name: Run test with Ruby ${{ matrix.ruby }}
services:
mysql:
image: mysql:8.0
env:
MYSQL_ROOT_PASSWORD: kuroko2_root
MYSQL_USER: kuroko2
MYSQL_PASSWORD: kuroko2
MYSQL_DATABASE: kuroko2
ports:
- 3306:3306
options: >-
--health-cmd "mysqladmin ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
RAILS_ENV: test
DATABASE_URL: mysql2://kuroko2:[email protected]:3306/kuroko2
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- run: bin/rails db:create db:schema:load
- run: bundle exec rspec
assets-precompile:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ruby:
- '2.7'
- '3.0'
- '3.1'
- '3.2'
name: Run assets:precompile with Ruby ${{ matrix.ruby }}
steps:
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- run: bin/rails app:assets:precompile RAILS_ENV=production SECRET_KEY_BASE=dummy