From 7dd2ad5b0da2f47a4ad4e80981fe40add39bd570 Mon Sep 17 00:00:00 2001 From: mkmn Date: Thu, 5 Dec 2024 10:49:01 +0900 Subject: [PATCH 1/2] use matrix jobs --- .circleci/config.yml | 50 +++++++++++++------------------------------- 1 file changed, 15 insertions(+), 35 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index a9f083b..7a1edaf 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,17 +1,5 @@ version: 2.1 -executors: - working_directory: /root/jpostcode-rb - ruby_3_2: - docker: - - image: cimg/ruby:3.2 - ruby_3_1: - docker: - - image: cimg/ruby:3.1 - ruby_3_0: - docker: - - image: cimg/ruby:3.0 - commands: install_system_dependencies: description: "Install system dependencies" @@ -48,24 +36,12 @@ commands: bundle exec rubocop jobs: - run_tests_on_ruby_3_2: - executor: ruby_3_2 - steps: - - install_system_dependencies - - checkout - - submodule_sync - - bundle_gems - - run_tests - run_tests_on_ruby_3_1: - executor: ruby_3_1 - steps: - - install_system_dependencies - - checkout - - submodule_sync - - bundle_gems - - run_tests - run_tests_on_ruby_3_0: - executor: ruby_3_0 + test: + parameters: + ruby-version: + type: string + docker: + - image: cimg/ruby:<< parameters.ruby-version >> steps: - install_system_dependencies - checkout @@ -74,9 +50,13 @@ jobs: - run_tests workflows: - version: 2 - test: + all-tests: jobs: - - run_tests_on_ruby_3_2 - - run_tests_on_ruby_3_1 - - run_tests_on_ruby_3_0 + - test: + matrix: + parameters: + ruby-version: + - "3.0" + - "3.1" + - "3.2" + - "3.3" From 6f0a71ab0d243d7b9d823ef3866a4bcfe6930274 Mon Sep 17 00:00:00 2001 From: mkmn Date: Thu, 5 Dec 2024 10:49:30 +0900 Subject: [PATCH 2/2] reduce resource class --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 7a1edaf..b5b1790 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -42,6 +42,7 @@ jobs: type: string docker: - image: cimg/ruby:<< parameters.ruby-version >> + resource_class: small steps: - install_system_dependencies - checkout