From 74aaea36ecc46786b92ce79c7d259b54d7d1017f Mon Sep 17 00:00:00 2001 From: Max Wofford Date: Fri, 9 May 2025 12:54:58 -0400 Subject: [PATCH] Add other test databases --- .github/workflows/ci.yml | 3 +++ config/database.yml | 18 ++++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d482385..da86f6b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -104,6 +104,9 @@ jobs: run: | bin/rails db:create RAILS_ENV=test bin/rails db:migrate RAILS_ENV=test + # Create additional test databases + psql -h localhost -U postgres -c "CREATE DATABASE test_sailors_log;" + psql -h localhost -U postgres -c "CREATE DATABASE test_warehouse;" bin/rails test - name: Keep screenshots from failed system tests diff --git a/config/database.yml b/config/database.yml index bb6c571..27b3f7e 100644 --- a/config/database.yml +++ b/config/database.yml @@ -47,9 +47,27 @@ test: username: postgres password: postgres # url: <%= ENV['TEST_DATABASE_URL'] %> + primary_direct: + adapter: postgresql + database: test_db + username: postgres + password: postgres + database_tasks: false wakatime: url: <%= ENV['WAKATIME_DATABASE_URL'] %> replica: true + sailors_log: + adapter: postgresql + database: test_sailors_log + username: postgres + password: postgres + replica: true + warehouse: + adapter: postgresql + database: test_warehouse + username: postgres + password: postgres + replica: true # Store production database in the storage/ directory, which by default