Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename development and test databases to be good_job #300

Merged
merged 1 commit into from
Jul 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,20 +41,20 @@ jobs:
pg: 10.8
env:
PGHOST: localhost
PGUSER: test_app
PGUSER: good_job
RAILS_ENV: test
BUNDLE_JOBS: 4
BUNDLE_RETRY: 3
BUNDLE_PATH: vendor/bundle
BUNDLE_WITHOUT: "lint"
BUNDLE_WITHOUT: lint
DISABLE_SPRING: 1
RAILS_LOG_TO_STDOUT: false
services:
postgres:
image: postgres:${{ matrix.pg }}
env:
POSTGRES_USER: test_app
POSTGRES_DB: test_app_test
POSTGRES_USER: good_job
POSTGRES_DB: good_job_test
POSTGRES_PASSWORD: ""
POSTGRES_HOST_AUTH_METHOD: trust
ports: ["5432:5432"]
Expand Down
1 change: 1 addition & 0 deletions spec/support/example_app_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ def setup_example_app
FileUtils.cd(root_path) do
system("rails new #{app_name} -d postgresql --no-assets --skip-action-text --skip-action-mailer --skip-action-mailbox --skip-action-cable --skip-git --skip-sprockets --skip-listen --skip-javascript --skip-turbolinks --skip-system-test --skip-test-unit --skip-bootsnap --skip-spring --skip-active-storage")
end
FileUtils.cp(::Rails.root.join('config', 'database.yml'), "#{example_app_path}/config/database.yml")

File.open("#{example_app_path}/Gemfile", 'a') do |f|
f.puts "gem 'good_job'"
Expand Down
8 changes: 4 additions & 4 deletions spec/test_app/config/database.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ default: &default

development:
<<: *default
database: <%= ENV["CI"] ? "test_app_test" : "test_app_development" %>
database: <%= ENV["CI"] ? "good_job_test" : "good_job_development" %>

# The specified database role being used to connect to postgres.
# To create additional roles in postgres see `$ createuser --help`.
# When left blank, postgres will use the default role. This is
# the same name as the operating system user that initialized the database.
#username: test_app
#username: good_job

# The password associated with the postgres role (username).
#password:
Expand Down Expand Up @@ -58,7 +58,7 @@ development:
# Do not set this db to the same as development or production.
test:
<<: *default
database: test_app_test
database: good_job_test

# As with config/credentials.yml, you never want to store sensitive information,
# like your database password, in your source code. If your source code is
Expand All @@ -81,4 +81,4 @@ test:
#
production:
<<: *default
database: <%= ENV["CI"] ? "test_app_test" : "test_app_development" %>
database: <%= ENV["CI"] ? "good_job_test" : "good_job_development" %>