From fabf4e085b03361a106a9d56ffe0d72abb8914b1 Mon Sep 17 00:00:00 2001 From: Thomas von Deyen Date: Wed, 1 Nov 2023 09:37:50 +0100 Subject: [PATCH] CI: Skip install_solidus check on non-current version The installer always uses the current released minor version (4.2 time writing this), but the check runs on all pipeline runs, wasting CI time and precious resources. Also it fails anyway, because of conflicting dependencies. So, we only run the check on main and latest minor now. (cherry picked from commit 8d653a5bef66e7d055a506215d6f02f0da7bc72f) --- .circleci/config.yml | 47 +++++++++++++++++++++++++------------------- 1 file changed, 27 insertions(+), 20 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 7f19d63ce43..9efbdd85546 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -254,26 +254,33 @@ jobs: ruby: "3.0" steps: - checkout - - libvips - - - install_solidus: { flags: "--sample=false --frontend=starter --authentication=devise" } - - test_page: { expected_text: "The only eCommerce platform you’ll ever need." } - - run: - name: Ensure the correct PayPal is installed for SSF - command: | - cd /tmp/my_app - bundle list | grep 'solidus_paypal_commerce_platform (1.' - - - install_solidus: { flags: "--sample=false --frontend=starter --authentication=devise --payment-method=stripe" } - - test_page: { expected_text: "The only eCommerce platform you’ll ever need." } - - - install_dummy_app - - - install_dummy_app: { extra_gems: "solidus_frontend" } - - run: - name: "Ensure solidus_frontend installer is run" - command: | - test -f /tmp/dummy_extension/spec/dummy/config/initializers/solidus_frontend.rb + - when: + condition: + or: + - equal: [main, << pipeline.git.branch >>] + - equal: [v4.2, << pipeline.git.branch >>] + steps: + - libvips + - install_solidus: + flags: "--sample=false --frontend=starter --authentication=devise" + - test_page: + expected_text: "The only eCommerce platform you’ll ever need." + - run: + name: Ensure the correct PayPal is installed for SSF + command: | + cd /tmp/my_app + bundle list | grep 'solidus_paypal_commerce_platform (1.' + - install_solidus: + flags: "--sample=false --frontend=starter --authentication=devise --payment-method=stripe" + - test_page: + expected_text: "The only eCommerce platform you’ll ever need." + - install_dummy_app + - install_dummy_app: + extra_gems: "solidus_frontend" + - run: + name: "Ensure solidus_frontend installer is run" + command: | + test -f /tmp/dummy_extension/spec/dummy/config/initializers/solidus_frontend.rb test_solidus: parameters: