@@ -143,128 +143,7 @@ commands:
143
143
sudo apt-get update
144
144
sudo apt-get install -yq libvips-dev
145
145
146
- install_solidus :
147
- parameters :
148
- flags :
149
- type : string
150
- default : " # no options"
151
- description : " flags to be passed to `bin/rails g solidus:install"
152
- steps :
153
- - run :
154
- name : " Cleanup & check rails version"
155
- command : |
156
- sudo gem update --system
157
- gem install bundler -v"~> 2.4"
158
- gem environment path
159
- rm -rf /tmp/my_app /tmp/.ruby-versions # cleanup previous runs
160
- rm -rf /tmp/my_app /tmp/.gems-versions # cleanup previous runs
161
-
162
- ruby -v >> /tmp/.ruby-versions
163
- gem --version >> /tmp/.gems-versions
164
- bundle --version >> /tmp/.gems-versions
165
- gem search -eq rails -v "~> 7" -v "< 8.0" >> /tmp/.gems-versions # get the latest rails from rubygems
166
- gem search -eq solidus >> /tmp/.gems-versions # get the latest solidus from rubygems
167
-
168
- cat /tmp/.ruby-versions
169
- cat /tmp/.gems-versions
170
- - restore_cache :
171
- keys :
172
- - solidus-installer-v11-{{ checksum "/tmp/.ruby-versions" }}-{{ checksum "/tmp/.gems-versions" }}
173
- - solidus-installer-v11-{{ checksum "/tmp/.ruby-versions" }}-
174
- - run :
175
- name : " Prepare the rails application"
176
- command : |
177
- cd /tmp
178
- test -d my_app || (gem install rails -v "< 8.0" && gem install solidus)
179
- test -d my_app || rails new my_app --skip-git
180
- - save_cache :
181
- key : solidus-installer-v11-{{ checksum "/tmp/.ruby-versions" }}-{{ checksum "/tmp/.gems-versions" }}
182
- paths :
183
- - /tmp/my_app
184
- - /home/circleci/.rubygems
185
- - run :
186
- name : " Run `solidus:install` with `<<parameters.flags>>`"
187
- command : |
188
- cd /tmp/my_app
189
- bundle add solidus --path "$(ruby -e"puts File.expand_path ENV['CIRCLE_WORKING_DIRECTORY']")"
190
- unset RAILS_ENV # avoid doing everything on the test environment
191
- bin/rails generate solidus:install --auto-accept <<parameters.flags>>
192
-
193
- test_page :
194
- parameters :
195
- app_root :
196
- type : string
197
- default : " /tmp/my_app"
198
- path :
199
- type : string
200
- default : " /"
201
- expected_text :
202
- type : string
203
-
204
- steps :
205
- - run :
206
- name : " Check the contents of the <<parameters.path>> page"
207
- command : |
208
- cd <<parameters.app_root>>
209
- unset RAILS_ENV # avoid doing everything on the test environment
210
- bin/rails server -p 3000 &
211
- wget --quiet --output-document - --tries=30 --retry-connrefused "http://localhost:3000<<parameters.path>>" | grep "<<parameters.expected_text>>"
212
- echo "Exited with $?"
213
- kill $(cat "tmp/pids/server.pid")
214
-
215
- install_dummy_app :
216
- parameters :
217
- extra_gems :
218
- type : string
219
- default : " "
220
- description : " Gems to be added to the extension's Gemfile before running the installer"
221
- steps :
222
- - run :
223
- name : " Test `rake task: extensions:test_app` <<#parameters.extra_gems>>(with <<parameters.extra_gems>>)<</parameters.extra_gems>>"
224
- command : |
225
- rm -rf /tmp/dummy_extension # cleanup previous runs
226
- mkdir -p /tmp/dummy_extension
227
- cd /tmp/dummy_extension
228
- bundle init
229
- bundle add rails -v "< 8.1" --skip-install
230
- bundle add sqlite3 -v "~> 2.0" --skip-install
231
- test -n "<<parameters.extra_gems>>" && bundle add <<parameters.extra_gems>> --skip-install
232
- bundle add solidus --path "$(ruby -e"puts File.expand_path ENV['CIRCLE_WORKING_DIRECTORY']")"
233
- export LIB_NAME=set # dummy requireable file
234
- bundle exec rake -rrails -rspree/testing_support/extension_rake -e'Rake::Task["extension:test_app"].invoke'
235
-
236
146
jobs :
237
- solidus_installer :
238
- executor :
239
- name : sqlite
240
- ruby : " 3.1"
241
- steps :
242
- - checkout
243
- - run :
244
- name : " Skip for Solidus older than 4.2"
245
- command : |
246
- ruby -I. -rcore/lib/spree/core/version.rb -e "exit Spree.solidus_gem_version >= Gem::Version.new('4.2')" ||
247
- circleci-agent step halt
248
- - libvips
249
- - install_solidus :
250
- flags : " --sample=false --frontend=starter --authentication=devise"
251
- - test_page :
252
- expected_text : " <title>Sample Store</title>"
253
- - run :
254
- name : Ensure the correct PayPal is installed for SSF
255
- command : |
256
- cd /tmp/my_app
257
- bundle list | grep 'solidus_paypal_commerce_platform (1.'
258
- - install_solidus :
259
- flags : " --sample=false --frontend=starter --authentication=devise --payment-method=stripe"
260
- - test_page :
261
- expected_text : " <title>Sample Store</title>"
262
- - install_dummy_app
263
- - run :
264
- name : " Ensure extension test app is created"
265
- command : |
266
- test -d /tmp/dummy_extension/spec/dummy
267
-
268
147
test_solidus :
269
148
parameters :
270
149
database :
@@ -343,7 +222,6 @@ jobs:
343
222
workflows :
344
223
build :
345
224
jobs :
346
- - solidus_installer
347
225
- test_solidus_with_coverage # Only test with coverage support with the default versions
348
226
349
227
# Based on supported versions for the current Solidus release and recommended versions from
0 commit comments