set up db the reasonable way

This commit is contained in:
Peter Bhat Harkins 2023-12-06 09:21:26 -06:00
parent 1f4547d2b9
commit d8ea92a140
2 changed files with 6 additions and 3 deletions

View File

@ -26,8 +26,10 @@ jobs:
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Prepare database
run: ./bin/rails db:prepare
- name: Load database schema
run: ./bin/rails db:schema:load
- name: Run pending migrations
run: ./bin/rails db:migrate
- name: Run tests
run: |
bundle exec rspec

View File

@ -26,7 +26,8 @@ FileUtils.chdir APP_ROOT do
system! 'bin/rails log:clear tmp:clear'
puts "\n== Preparing database =="
system! 'bin/rails db:prepare'
system! 'bin/rails db:schema:load'
system! 'bin/rails db:migrate'
puts "\n== Restarting application server if running =="
system! 'bin/rails restart'