From 6a99e8318e72acca19a00ecd64cd59b9355b6626 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Busqu=C3=A9?= Date: Tue, 2 May 2023 12:48:23 +0200 Subject: [PATCH] Update CI configuration Run different Solidus versions on different jobs for better error handling. We're now explicitly providing the ruby version to the executor while using a matrix configuration for better extensibility. --- .circleci/config.yml | 48 +++++++++++++++++++++++++++++++++----------- 1 file changed, 36 insertions(+), 12 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index e7e2f713..d7bd5d8c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -8,14 +8,23 @@ orbs: solidusio_extensions: solidusio/extensions@volatile jobs: - run-specs-with-postgres: - executor: solidusio_extensions/postgres + run-specs: + parameters: + solidus: + type: string + default: master + db: + type: string + default: "postgres" + ruby: + type: string + default: "3.2" + executor: + name: solidusio_extensions/<< parameters.db >> + ruby_version: << parameters.ruby >> steps: - - solidusio_extensions/run-tests - run-specs-with-mysql: - executor: solidusio_extensions/mysql - steps: - - solidusio_extensions/run-tests + - checkout + - solidusio_extensions/run-tests-solidus-<< parameters.solidus >> lint-code: executor: solidusio_extensions/sqlite-memory steps: @@ -24,9 +33,18 @@ jobs: workflows: "Run specs on supported Solidus versions": jobs: - - run-specs-with-postgres - - run-specs-with-mysql - - lint-code + - run-specs: + name: &name "run-specs-solidus-<< matrix.solidus >>-ruby-<< matrix.ruby >>-db-<< matrix.db >>" + matrix: + parameters: { solidus: ["master"], ruby: ["3.2"], db: ["postgres"] } + - run-specs: + name: *name + matrix: + parameters: { solidus: ["current"], ruby: ["3.1"], db: ["mysql"] } + - run-specs: + name: *name + matrix: + parameters: { solidus: ["older"], ruby: ["3.0"], db: ["sqlite"] } "Weekly run specs against master": triggers: @@ -37,5 +55,11 @@ workflows: only: - master jobs: - - run-specs-with-postgres - - run-specs-with-mysql + - run-specs: + name: *name + matrix: + parameters: { solidus: ["master"], ruby: ["3.2"], db: ["postgres"] } + - run-specs: + name: *name + matrix: + parameters: { solidus: ["current"], ruby: ["3.1"], db: ["mysql"] }