@@ -8,34 +8,20 @@ defaults: &defaults
88 - image : cimg/ruby:<< parameters.ruby-version >>
99
1010orbs :
11- ruby : circleci/ruby@2.0 .0
11+ ruby : circleci/ruby@2.1 .0
1212
1313references :
14- restore_bundle_cache : &restore_bundle_cache
15- restore_cache :
16- keys :
17- - ruby-smtp-mock-{{ checksum "smtp_mock.gemspec" }}
18- paths :
19- - ~/vendor/bundle
20-
2114 bundle_install : &bundle_install
2215 run :
2316 name : Installing gems
2417 command : |
2518 bundle config set --local path '~/vendor/bundle'
2619 bundle install
2720
28- save_bundle_cache : &save_bundle_cache
29- save_cache :
30- key : ruby-smtp-mock-{{ checksum "smtp_mock.gemspec" }}
31- paths :
32- - ~/vendor/bundle
33-
34- system_dependencies : &system_dependencies
21+ install_system_dependencies : &install_system_dependencies
3522 run :
36- name : Installing system requirements
37- command : |
38- bundle exec smtp_mock -s -i ~
23+ name : Installing system dependencies
24+ command : bundle exec smtp_mock -s -i ~
3925
4026 install_linters : &install_linters
4127 run :
@@ -55,6 +41,11 @@ references:
5541 curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
5642 chmod +x ./cc-test-reporter
5743
44+ use_latest_bundler : &use_latest_bundler
45+ run :
46+ name : Using latest bundler
47+ command : gem install bundler
48+
5849 use_latest_gemspec : &use_latest_gemspec
5950 run :
6051 name : Using latest gemspec
7667 steps :
7768 - checkout
7869
70+ - << : *use_latest_bundler
7971 - << : *use_latest_gemspec
80- - << : *restore_bundle_cache
8172 - << : *bundle_install
82- - << : *save_bundle_cache
8373 - << : *install_linters
8474
8575 - run :
@@ -112,11 +102,10 @@ jobs:
112102 steps :
113103 - checkout
114104
105+ - << : *use_latest_bundler
115106 - << : *use_latest_gemspec
116- - << : *restore_bundle_cache
117107 - << : *bundle_install
118- - << : *save_bundle_cache
119- - << : *system_dependencies
108+ - << : *install_system_dependencies
120109 - << : *install_codeclimate_reporter
121110
122111 - run :
@@ -157,12 +146,26 @@ jobs:
157146 with-cache : false
158147 path : ' ~/vendor/custom_bundle'
159148
160- - << : *system_dependencies
149+ - << : *install_system_dependencies
161150
162151 - run :
163152 name : Running compatibility tests
164153 command : bundle exec rspec
165154
155+ rubygems-deps-ruby :
156+ parameters :
157+ ruby-version :
158+ type : string
159+
160+ << : *defaults
161+
162+ steps :
163+ - checkout
164+
165+ - run :
166+ name : Building rubygems dependencies from default gemspec on minimal Ruby version
167+ command : bundle install
168+
166169 releasing-gem-from-ruby :
167170 parameters :
168171 ruby-version :
@@ -196,11 +199,16 @@ workflows:
196199 matrix :
197200 parameters :
198201 ruby-version : ["2.5", "2.6", "2.7", "3.0", "3.1"]
202+ - rubygems-deps-ruby :
203+ matrix :
204+ parameters :
205+ ruby-version : ["2.5"]
199206 - releasing-gem-from-ruby :
200207 requires :
201208 - linters-ruby
202209 - tests-ruby
203210 - compatibility-ruby
211+ - rubygems-deps-ruby
204212 matrix :
205213 parameters :
206214 ruby-version : ["2.5"]
0 commit comments