From aa244df0afacdaeeba8a9ab817550ebb3e1d8962 Mon Sep 17 00:00:00 2001 From: Thomas von Deyen Date: Thu, 5 Dec 2024 08:15:06 +0100 Subject: [PATCH 1/3] CI: Raise Rails deprecations In order to tackle deprecations one by one --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 1e753503a88..6facf924f25 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -14,6 +14,7 @@ executors: environment: &environment DEFAULT_MAX_WAIT_TIME: 10 SOLIDUS_RAISE_DEPRECATIONS: true + RAILS_DEPRECATIONS_BEHAVIOR: raise CIRCLE_TEST_REPORTS: /tmp/test-results CIRCLE_ARTIFACTS: /tmp/test-artifacts BUNDLE_WITHOUT: "lint,release" From 743c990d4adf244a482be69d36c49f14e910be32 Mon Sep 17 00:00:00 2001 From: Thomas von Deyen Date: Thu, 5 Dec 2024 08:18:03 +0100 Subject: [PATCH 2/3] CI: Only test Rails 7.2 and 8.0 for now --- .circleci/config.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 6facf924f25..699629127a7 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -375,7 +375,7 @@ workflows: { parameters: { - rails: ["7.0", "7.1", "7.2"], + rails: ["7.2"], ruby: ["3.1"], database: ["mysql"], paperclip: [true], @@ -387,8 +387,8 @@ workflows: { parameters: { - rails: ["7.0", "7.1", "7.2"], - ruby: ["3.1"], + rails: ["7.2"], + ruby: ["3.2"], database: ["postgres"], paperclip: [false], }, @@ -399,8 +399,8 @@ workflows: { parameters: { - rails: ["7.1"], - ruby: ["3.2"], + rails: ["7.2"], + ruby: ["3.3"], database: ["sqlite"], paperclip: [false], }, @@ -411,8 +411,8 @@ workflows: { parameters: { - rails: ["7.2", "main"], - ruby: ["3.3.5"], + rails: ["8.0"], + ruby: ["3.3"], database: ["sqlite"], paperclip: [false], }, From c333192442c251aeb5ea71df51685c83302ead6c Mon Sep 17 00:00:00 2001 From: Thomas von Deyen Date: Thu, 5 Dec 2024 08:23:15 +0100 Subject: [PATCH 3/3] CI: Eager Load classes before tests This is the Rails default. From the docs > Eager loading loads your whole application. When running a single test locally, > this probably isn't necessary. It's a good idea to do in a continuous integration > system, or in some way before deploying your code. --- core/lib/spree/testing_support/dummy_app.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/lib/spree/testing_support/dummy_app.rb b/core/lib/spree/testing_support/dummy_app.rb index 7e2e7707f20..d703397b9ed 100644 --- a/core/lib/spree/testing_support/dummy_app.rb +++ b/core/lib/spree/testing_support/dummy_app.rb @@ -84,7 +84,7 @@ class Application < ::Rails::Application config.log_level = :debug # Improve test suite performance: - config.eager_load = false + config.eager_load = ENV['CI'].present? config.public_file_server.headers = { 'Cache-Control' => 'public, max-age=3600' } config.cache_store = :memory_store