Commit 8f598780 authored by Heinrich Lee Yu's avatar Heinrich Lee Yu

Cache classes in CI

Source code won't change in CI so we don't need code-reloading
parent fd74d775
......@@ -10,11 +10,8 @@ Rails.application.configure do
# your test database is "scratch space" for the test suite and is wiped
# and recreated between test runs. Don't rely on the data there!
# Enabling caching of classes slows start-up time because all controllers
# are loaded at initialization, but it reduces memory and load because files
# are not reloaded with every request. For example, caching is not necessary
# for loading database migrations but useful for handling Knapsack specs.
config.cache_classes = ENV['CACHE_CLASSES'] == 'true'
# Code doesn't change in CI so we don't need code-reloading
config.cache_classes = !!ENV['CI']
# Configure static asset server for tests with Cache-Control for performance
config.assets.compile = false if ENV['CI']
......
......@@ -40,7 +40,6 @@ function rspec_simple_job() {
local rspec_opts="${1}"
export NO_KNAPSACK="1"
export CACHE_CLASSES="true"
scripts/gitaly-test-spawn
......@@ -59,7 +58,6 @@ function rspec_paralellized_job() {
spec_folder_prefix="ee/"
fi
export CACHE_CLASSES="true"
export KNAPSACK_LOG_LEVEL="debug"
export KNAPSACK_REPORT_PATH="knapsack/${test_tool}_${test_level}_${database}_${CI_NODE_INDEX}_${CI_NODE_TOTAL}_report.json"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment