diff --git a/.circleci/config.yml b/.circleci/config.yml index e7b6437495..605f376913 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -263,9 +263,9 @@ jobs: paperclip: type: boolean default: true - legacy: - type: string - default: "0" + legacy_events: + type: boolean + default: false executor: name: << parameters.database >> ruby: << parameters.ruby >> @@ -273,7 +273,7 @@ jobs: environment: DISABLE_ACTIVE_STORAGE: << parameters.paperclip >> RAILS_VERSION: "~> << parameters.rails >>" - USE_LEGACY_EVENTS: << parameters.legacy >> + USE_LEGACY_EVENTS: << parameters.legacy_events >> BUILDKITE_ANALYTICS_EXECUTION_NAME_PREFIX: "(<< parameters.ruby >>:<< parameters.rails >>:<< parameters.database >>:<< parameters.paperclip >>)" steps: - setup @@ -333,15 +333,15 @@ workflows: # https://www.fastruby.io/blog/ruby/rails/versions/compatibility-table.html. - test_solidus: context: slack-secrets - name: &name "test-rails-<>-ruby-<>-<>-<<#matrix.paperclip>>paperclip<><<^matrix.paperclip>>activestorage<>" - matrix: { parameters: { rails: ['7.0'], ruby: ['3.1', '3.2'], database: ['mysql', 'sqlite', 'postgres'], paperclip: [true, false] } } + name: &name "test-rails-<>-ruby-<>-<>-<<#matrix.paperclip>>paperclip<><<^matrix.paperclip>>activestorage<><<#matrix.legacy_events>>-legacy_events<>" + matrix: { parameters: { rails: ['7.0'], ruby: ['3.1', '3.2'], database: ['mysql', 'sqlite', 'postgres'], paperclip: [true, false], legacy_events: [false] } } - test_solidus: context: slack-secrets name: *name - matrix: { parameters: { rails: ['6.1'], ruby: ['2.7', '3.0', '3.1'], database: ['sqlite'], paperclip: [false] } } + matrix: { parameters: { rails: ['6.1'], ruby: ['2.7', '3.0', '3.1'], database: ['sqlite'], paperclip: [false], legacy_events: [false] } } - test_solidus: context: slack-secrets name: *name - matrix: { parameters: { rails: ['6.0'], ruby: ['2.7'], database: ['sqlite'], paperclip: [true] } } + matrix: { parameters: { rails: ['6.0'], ruby: ['2.7'], database: ['sqlite'], paperclip: [true], legacy_events: [true] } } - dev_tools: context: slack-secrets diff --git a/core/lib/spree/testing_support/dummy_app.rb b/core/lib/spree/testing_support/dummy_app.rb index 6fdc5ace42..ffc4cf619a 100644 --- a/core/lib/spree/testing_support/dummy_app.rb +++ b/core/lib/spree/testing_support/dummy_app.rb @@ -138,7 +138,7 @@ class Application < ::Rails::Application Spree.user_class = 'Spree::LegacyUser' Spree.load_defaults(Spree.solidus_version) Spree.config do |config| - config.use_legacy_events = ENV['USE_LEGACY_EVENTS'].present? + config.use_legacy_events = (ENV['USE_LEGACY_EVENTS'] == 'true') if ENV['DISABLE_ACTIVE_STORAGE'] config.image_attachment_module = 'Spree::Image::PaperclipAttachment'