From edb8920f278cb375c3ec30b1cbb1bc48835c1a1b Mon Sep 17 00:00:00 2001 From: Eric Schultz Date: Fri, 7 Sep 2018 13:09:20 -0500 Subject: [PATCH] Updatery --- .travis.yml | 2 +- config/database.yml | 10 ++++++++++ config/environments/ci.rb | 8 ++++++++ script/test.sh | 2 +- 4 files changed, 20 insertions(+), 2 deletions(-) create mode 100755 config/environments/ci.rb diff --git a/.travis.yml b/.travis.yml index 1bdadf5c..ae04358c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,4 +10,4 @@ before_install: - cp .env.template .env script: -- docker-compose -f docker/build/docker-compose.yml run build script/test.sh \ No newline at end of file +- docker-compose -f docker/build/docker-compose.yml -e RACK_ENV=ci -e RAILS_ENV=ci run build script/test.sh \ No newline at end of file diff --git a/config/database.yml b/config/database.yml index 476a7a84..95030c22 100755 --- a/config/database.yml +++ b/config/database.yml @@ -30,6 +30,16 @@ test: username: admin password: password host: <%= ENV['DATABASE_HOST'] || 'localhost' %> +ci: + adapter: postgresql + encoding: unicode + database: commitchange_test + pool: 5 + username: admin + password: password + host: <%= ENV['DATABASE_HOST'] || 'localhost' %> + + # Connect on a TCP socket. Omitted by default since the client uses a # domain socket that doesn't need configuration. Windows does not have diff --git a/config/environments/ci.rb b/config/environments/ci.rb new file mode 100755 index 00000000..d306924c --- /dev/null +++ b/config/environments/ci.rb @@ -0,0 +1,8 @@ +# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later +require 'config/environments/test.rb' + +Commitchange::Application.configure do + + config.log_level = :info + +end diff --git a/script/test.sh b/script/test.sh index aad0ada2..3b28eb5e 100755 --- a/script/test.sh +++ b/script/test.sh @@ -1,2 +1,2 @@ #!/bin/bash -rake db:create db:structure:load test:prepare && rake spec && npx jest && npm run build-all \ No newline at end of file +npm install && rake db:create db:structure:load test:prepare && rake spec && npx jest && npm run build-all \ No newline at end of file