Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.
Ruby b2b-commercee-commerceecommerceecommerce-apiecommerce-frameworkecommerce-platformheadlessheadless-commerceheadless-ecommercemarketplacemulti-tenantmulti-vendormulti-vendor-ecommerceopen-sourcespree-commerce
Simplify Circle CI config and use .ruby-version (#12013)
Damian Legawiecbae7dbb5e907
diff --git a/.circleci/config.yml b/.circleci/config.ymlindex d789987d6a..92e0957583 100644--- a/.circleci/config.yml+++ b/.circleci/config.yml@@ -2,17 +2,15 @@ version: 2.1defaults: &defaultsparameters: &default_parameters- ruby_image:- type: stringrestore_cache_key_1:type: string- default: 'spree-bundle-v10-ruby-3-3-{{ .Branch }}'+ default: 'spree-bundle-v10-ruby-{{ checksum ".ruby-version" }}-{{ .Branch }}'restore_cache_key_2:type: string- default: spree-bundle-v10-ruby-3-3+ default: 'spree-bundle-v10-ruby-{{ checksum ".ruby-version" }}'save_cache_key:type: string- default: "n"+ default: 'spree-bundle-v10-ruby-{{ checksum ".ruby-version" }}-{{ .Branch }}'run_file_path:type: stringrails_version:@@ -28,14 +26,16 @@ defaults: &defaultsBUNDLE_RETRY: 3BUNDLE_PATH: ~/spree/vendor/bundleRAILS_VERSION: << parameters.rails_version >>+ DB: postgres # default value, this will speed up bundle install for all postgres buildsworking_directory: ~/spreedocker:- - image: &ruby_image << parameters.ruby_image >>+ - image: &ruby_image cimg/ruby:3.3.0-browsersjobs:run_test: &run_test<<: *defaults+ parallelism: 8steps: &default_steps- checkout- attach_workspace:@@ -74,35 +74,22 @@ jobs:tests_postgres:<<: *run_test- parallelism: << parameters.parallelism >>parameters:<<: *default_parameters- postgres_image:- type: string- parallelism:- type: integer- default: 8environment:<<: *environment- DB: postgresDB_HOST: localhostDB_USERNAME: postgresdocker:- image: *ruby_image- - image: << parameters.postgres_image >>+ - image: cimg/postgres:16.2environment:POSTGRES_USER: postgrestests_mysql:<<: *run_test- parallelism: << parameters.parallelism >>parameters:<<: *default_parameters- mysql_image:- type: string- parallelism:- type: integer- default: 8environment:<<: *environmentDB: mysql@@ -112,7 +99,7 @@ jobs:COVERAGE_DIR: /tmp/workspace/simplecovdocker:- image: *ruby_image- - image: << parameters.mysql_image >>+ - image: cimg/mysql:8.0command: [--default-authentication-plugin=mysql_native_password]send_test_coverage:@@ -135,53 +122,41 @@ jobs:workflows:- version: 2main:jobs:- run_test:- name: bundle_ruby_3_3- ruby_image: cimg/ruby:3.3.0-browsers- save_cache_key: spree-bundle-v10-ruby-3-1-{{ .Branch }}-{{ checksum "Gemfile.lock" }}+ name: bundle_rubyrun_file_path: ./bin/bundle_ruby.sh- run_test:name: brakeman- ruby_image: cimg/ruby:3.3.0-browsersrestore_cache_key_1: spree-brakeman-{{ .Branch }}restore_cache_key_2: spree-brakemansave_cache_key: spree-brakeman-{{ .Branch }}-{{ checksum "Gemfile.lock" }}run_file_path: ./bin/brakeman.shrequires:- - bundle_ruby_3_3+ - bundle_ruby- tests_postgres:- name: tests_ruby_3_3_rails_7_0_postgres- rails_version: '~> 7.0.0'- ruby_image: cimg/ruby:3.3.0-browsers- postgres_image: cimg/postgres:16.2+ name: tests_rails_postgresstore_artefacts: truerun_file_path: ./bin/tests_database_ci.shrequires:- - bundle_ruby_3_3+ - bundle_ruby- tests_postgres:- name: tests_ruby_3_3_rails_7_1_postgres- ruby_image: cimg/ruby:3.3.0-browsers- postgres_image: cimg/postgres:16.2+ name: tests_rails_7_0_postgres+ rails_version: '~> 7.0.0'store_artefacts: truerun_file_path: ./bin/tests_database_ci.shrequires:- - bundle_ruby_3_3+ - bundle_ruby- tests_postgres:- name: tests_ruby_3_3_rails_6_1_postgres+ name: tests_rails_6_1_postgresrails_version: '~> 6.1.0'- ruby_image: cimg/ruby:3.3.0-browsers- postgres_image: cimg/postgres:16.2store_artefacts: truerun_file_path: ./bin/tests_database_ci.shrequires:- - bundle_ruby_3_3+ - bundle_ruby- tests_mysql:- name: tests_ruby_3_3_rails_7_1_mysql- ruby_image: cimg/ruby:3.3.0-browsers- mysql_image: cimg/mysql:8.0+ name: tests_rails_mysqlstore_artefacts: truerun_file_path: ./bin/tests_database_ci.shpost-steps:@@ -190,11 +165,10 @@ workflows:paths:- simplecovrequires:- - bundle_ruby_3_3+ - bundle_ruby- send_test_coverage:name: send_test_coverage- ruby_image: cimg/ruby:3.3.0-browsersrun_file_path: ./bin/tests_coverage.shrequires:- - tests_ruby_3_3_rails_7_1_mysql+ - tests_rails_mysqldiff --git a/.ruby-version b/.ruby-versionnew file mode 100644index 0000000000..0fa4ae4890--- /dev/null+++ b/.ruby-version@@ -0,0 +1 @@+3.3.0\ No newline at end of file