.github/workflows/ci.yml
name: Rails Test
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2
- name: Build and test with Rake
env:
RAILS_ENV: test
run: |
gem install bundler
bundle install --jobs 4 --retry 3
bundle exec rake db:create
bundle exec rake db:migrate
bundle exec rails test