Skip to content

Commit

Permalink
Let bundler only use the lint and release groups when necessary
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
elia committed Oct 25, 2023
1 parent 8968598 commit 03fd580
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
4 changes: 3 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -230,6 +230,8 @@ jobs:
lint_code:
docker:
- image: cimg/ruby:3.2-node
environment:
BUNDLE_ONLY: "lint"
steps:
- checkout
- run: 'bundle install'
Expand Down
14 changes: 6 additions & 8 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -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/)
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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)

0 comments on commit 03fd580

Please sign in to comment.