diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ee988d0..12b3510 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -91,7 +91,7 @@ jobs: env: RAILS_ENV: test # REDIS_URL: redis://localhost:6379/0 - DATABASE_URL: postgres://postgres:postgres@localhost:5432/postgres + TEST_DATABASE_URL: postgres://postgres:postgres@localhost:5432/postgres run: bin/rails db:test:prepare test test:system - name: Keep screenshots from failed system tests diff --git a/config/database.yml b/config/database.yml index 4b4de59..4d3394e 100644 --- a/config/database.yml +++ b/config/database.yml @@ -5,21 +5,17 @@ # gem "sqlite3" # default: &default - adapter: sqlite3 + adapter: postgresql + encoding: unicode pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %> timeout: 5000 development: primary: <<: *default - # database: storage/development.sqlite3 - adapter: postgresql - encoding: unicode pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %> url: <%= ENV['DATABASE_URL'] %> wakatime: - adapter: postgresql - encoding: unicode url: <%= ENV['WAKATIME_DATABASE_URL'] %> replica: true @@ -29,10 +25,8 @@ development: test: primary: <<: *default - database: storage/test.sqlite3 + url: <%= ENV['TEST_DATABASE_URL'] %> wakatime: - adapter: postgresql - encoding: unicode url: <%= ENV['WAKATIME_DATABASE_URL'] %> replica: true @@ -41,13 +35,9 @@ test: # is mounted as a persistent Docker volume in config/deploy.yml. production: primary: - adapter: postgresql - encoding: unicode pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %> url: <%= ENV['DATABASE_URL'] %> wakatime: - adapter: postgresql - encoding: unicode url: <%= ENV['WAKATIME_DATABASE_URL'] %> replica: true cache: