From 03fd58007c6e82fe820ac7c4a3eba350d5056afc Mon Sep 17 00:00:00 2001 From: Elia Schito Date: Wed, 25 Oct 2023 12:25:03 +0200 Subject: [PATCH] Let bundler only use the `lint` and `release` groups when necessary Those two groups are useful in order to get quick bundle install times when the CI or GH action need to run a task only related to those gems. --- .circleci/config.yml | 4 +++- Gemfile | 14 ++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index d21be2dc603..9ec9359362f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -16,7 +16,7 @@ executors: SOLIDUS_RAISE_DEPRECATIONS: true CIRCLE_TEST_REPORTS: /tmp/test-results CIRCLE_ARTIFACTS: /tmp/test-artifacts - BUNDLE_WITHOUT: "utils" + BUNDLE_WITHOUT: "lint,release" docker: - image: &image cimg/ruby:<< parameters.ruby >>-browsers @@ -230,6 +230,8 @@ jobs: lint_code: docker: - image: cimg/ruby:3.2-node + environment: + BUNDLE_ONLY: "lint" steps: - checkout - run: 'bundle install' diff --git a/Gemfile b/Gemfile index cc686abe521..b2856d6deed 100644 --- a/Gemfile +++ b/Gemfile @@ -17,6 +17,9 @@ end # and https://github.com/rails/sprockets-rails/issues/369 gem 'sprockets', '~> 3' +gem 'pry' +gem 'launchy', require: false + dbs = ENV['DB_ALL'] ? 'all' : ENV.fetch('DB', 'sqlite') gem 'mysql2', '~> 0.5.0', require: false if dbs.match?(/all|mysql/) gem 'pg', '~> 1.0', require: false if dbs.match?(/all|postgres/) @@ -31,6 +34,8 @@ gem 'simplecov-cobertura', require: false gem 'rails-controller-testing', require: false gem 'puma', '< 6', require: false gem 'i18n-tasks', '~> 0.9', require: false +gem 'rspec_junit_formatter', require: false +gem 'yard', require: false # Ensure the requirement is also updated in core/lib/spree/testing_support/factory_bot.rb gem 'factory_bot_rails', '>= 4.8', require: false @@ -53,10 +58,8 @@ group :admin do gem 'axe-core-capybara', '~> 4.7', require: false end -group :utils do +group :lint do gem 'erb-formatter', require: false - gem 'pry' - gem 'launchy', require: false gem 'rubocop', '~> 1', require: false gem 'rubocop-performance', '~> 1.4', require: false gem 'rubocop-rails', '~> 2.9', require: false @@ -67,10 +70,5 @@ group :release do gem 'faraday-retry', '~> 2.0', require: false end -gem 'rspec_junit_formatter', require: false, group: :ci - -# Documentation -gem 'yard', require: false, group: :docs - custom_gemfile = File.expand_path('Gemfile-custom', __dir__) eval File.read(custom_gemfile), nil, custom_gemfile, 0 if File.exist?(custom_gemfile)