Skip to content

Commit fc76ff1

Browse files
committed
1 parent 48b976e commit fc76ff1

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

config/environments/test.rb

+5
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,9 @@
4343
config.cache_store = :null_store
4444

4545
config.active_job.queue_adapter = :test
46+
47+
if ENV['CI'] && !ENV['RAILS_ENABLE_TEST_LOG']
48+
config.logger = Logger.new(nil)
49+
config.log_level = :fatal
50+
end
4651
end

doc/development/testing.md

+5
Original file line numberDiff line numberDiff line change
@@ -479,6 +479,11 @@ slowest test files and try to improve them.
479479
run the suite against MySQL for tags, `master`, and any branch that includes
480480
`mysql` in the name.
481481
- On EE, the test suite always runs both PostgreSQL and MySQL.
482+
- Rails logging to `log/test.log` is disabled by default in CI [for
483+
performance reasons][logging]. To override this setting, provide the
484+
`RAILS_ENABLE_TEST_LOG` environment variable.
485+
486+
[logging]: https://jtway.co/speed-up-your-rails-test-suite-by-6-in-1-line-13fedb869ec4
482487

483488
## Spinach (feature) tests
484489

0 commit comments

Comments
 (0)