Skip to content

Commit

Permalink
Add db migrate to smoke testing
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenbinns committed Aug 6, 2024
1 parent 5cb524a commit 7ac29ce
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions bin/que
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,16 @@ Que.logger ||= Logger.new($stdout)
if options.ci
require "active_record"

ActiveRecord::Base.establish_connection(
adapter: "postgresql",
host: ENV.fetch("PGHOST", "localhost"),
user: ENV.fetch("PGUSER", "postgres"),
password: ENV.fetch("PGPASSWORD", ""),
database: ENV.fetch("PGDATABASE", "que-test"),
)

Que.connection = ActiveRecord
Que.migrate!
end

begin
Expand Down

0 comments on commit 7ac29ce

Please sign in to comment.