Skip to content

Merge pull request #25 from yu-yaba/feature/ci(#24) #9

Merge pull request #25 from yu-yaba/feature/ci(#24)

Merge pull request #25 from yu-yaba/feature/ci(#24) #9

Workflow file for this run

name: "gatareview-back CI"
on:
push:
jobs:
test:
runs-on: ubuntu-latest
services:
mysql:
image: mysql:8.0.33
ports:
- "3306:3306"
env:
MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
env:
RAILS_ENV: test
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2.2'
bundler-cache: true
- name: Install dependencies
run: bundle install --jobs 4 --retry 3
- name: Copy database configuration
run: cp config/database.yml.ci config/database.yml
- name: Set up database
run: |
bundle exec rails db:create
bundle exec rails db:schema:load
- name: Run RSpec tests
run: bundle exec rspec
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: '3.2.2'
bundler-cache: true
- name: Install dependencies
run: bundle install --jobs 4 --retry 3
- name: Run RuboCop
run: bundle exec rubocop