Skip to content

#567 add test suite

#567 add test suite #3

Workflow file for this run

name: CI
on:
pull_request:
push:
branches: [ main ]
jobs:
# lint:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout code
# uses: actions/checkout@v4
# - name: Set up Ruby
# uses: ruby/setup-ruby@v1
# with:
# ruby-version: .ruby-version
# bundler-cache: true
# - name: Lint code for consistent style
# run: bin/rubocop -f github
test:
runs-on: ubuntu-latest
services:
mysql:
image: mariadb:10.11
env:
MARIADB_ALLOW_EMPTY_ROOT_PASSWORD: true
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- name: Install packages
run: sudo apt-get update && sudo apt-get install --no-install-recommends -y google-chrome-stable curl libvips libjemalloc2 default-mysql-client default-libmysqlclient-dev
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: .ruby-version
bundler-cache: true
- name: Run tests
env:
RAILS_ENV: test
DATABASE_URL: mysql2://127.0.0.1:3306
run: bin/rails db:setup test