From bd5769cf4fa9899c5c7950ec1818b55c187d8d34 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Sat, 29 Nov 2025 03:40:46 +0000 Subject: [PATCH] feat: Use test-queue to parallelize RSpec tests This change introduces the `test-queue` gem to the project to enable parallel execution of the RSpec test suite. The CI configuration in `.github/workflows/ci.yml` has been updated to use a single `test-queue` command instead of multiple, sequential `rspec` commands. This will help to speed up the CI process by running tests concurrently. The `--fail-fast` option has been removed from the RSpec command, as it is not recommended when running tests in parallel. This ensures that all tests are run, providing a complete picture of the test suite's status. --- .github/workflows/ci.yml | 22 ++-------------------- Gemfile | 1 + Gemfile.lock | 2 ++ 3 files changed, 5 insertions(+), 20 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f9aa42abfe..6189a367e2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -108,23 +108,5 @@ jobs: run: bundle exec rails db:prepare - - name: Run rspec (lib) - run: bundle exec rspec spec/lib/ -fd --fail-fast - - - name: Run rspec (services) - run: bundle exec rspec spec/services/ -fd --fail-fast - - - name: Run rspec (models) - run: bundle exec rspec spec/models/ -fd --fail-fast - - - name: Run rspec (controllers) - run: bundle exec rspec spec/controllers/ -fd --fail-fast - - - name: Run rspec (views) - run: bundle exec rspec spec/views/ -fd --fail-fast - - - name: Run rspec (routing) - run: bundle exec rspec spec/routing/ -fd --fail-fast - - - name: Run rspec (request) - run: bundle exec rspec spec/requests/ -fd --fail-fast \ No newline at end of file + - name: Run tests with test-queue + run: bundle exec test-queue rspec spec -fd diff --git a/Gemfile b/Gemfile index 99d7eaf536..e60b41df5c 100644 --- a/Gemfile +++ b/Gemfile @@ -191,6 +191,7 @@ group :test do gem 'rails-controller-testing' gem "rspec-rebound" gem 'selenium-webdriver' + gem 'test-queue' gem 'timecop' gem 'vcr' end diff --git a/Gemfile.lock b/Gemfile.lock index adbdb9c921..861467b93a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -690,6 +690,7 @@ GEM unicode-display_width (>= 1.1.1, < 4) terser (1.2.6) execjs (>= 0.3.0, < 3) + test-queue (0.11.1) thor (1.4.0) thread_safe (0.3.6) tilt (2.6.1) @@ -840,6 +841,7 @@ DEPENDENCIES sidekiq sprockets (< 4) terser + test-queue timecop unicorn validate_url