diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f344e61639bc7ee0deb031f5072e8861a82abd96..9e1508f6c9d7cb1b78d8fbba5c6c8a04827c36b4 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -68,6 +68,7 @@ variables: ELASTIC_URL: "http://elastic:changeme@elasticsearch:9200" DOCKER_VERSION: "20.10.1" CACHE_CLASSES: "true" + CHECK_PRECOMPILED_ASSETS: "true" FF_USE_FASTZIP: "true" # Preparing custom clone path to reduce space used by all random forks diff --git a/config/environments/test.rb b/config/environments/test.rb index 2c6ab3bbc7900715378e15fb1125b0ce9448df86..9fa8a1b762c7bea2465f1e625b52489e381962b1 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -23,6 +23,9 @@ # Configure static asset server for tests with Cache-Control for performance config.assets.compile = false if ENV['CI'] + # There is no need to check if assets are precompiled locally + # To debug AssetNotPrecompiled errors locally, set CHECK_PRECOMPILED_ASSETS to true + config.assets.check_precompiled_asset = Gitlab::Utils.to_boolean(ENV['CHECK_PRECOMPILED_ASSETS'], default: false) config.public_file_server.enabled = true config.public_file_server.headers = { 'Cache-Control' => 'public, max-age=3600' }