Skip to content

Testing improvements #7

Testing improvements

Testing improvements #7

Workflow file for this run

name: Rails testing
on:
push:
branches:
- develop
pull_request:
branches:
- develop
env:
RAILS_ENV: test
jobs:
ruby-3_1:
name: Ruby 3.1 testing
runs-on: ubuntu-latest
services:
mysql:
image: mysql:8.0
env:
MYSQL_ROOT_HOST: '%'
MYSQL_ROOT_PASSWORD: 'root'
MYSQL_DATABASE: 'qpixel_test'
ports:
- 3306:3306
redis:
image: redis:8.0
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Setup dependencies
run: |
sudo apt-get -qq update
sudo apt-get -yqq install libmariadb-dev libmagickwand-dev
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.1
bundler-cache: true
- name: Prepare for testing
run: |
cp config/database.sample.yml config/database.yml
cp config/storage.sample.yml config/storage.yml
bundle exec rails db:create
bundle exec rails db:schema:load
bundle exec rails db:migrate
bundle exec rails test:prepare
- run: bundle exec rails test