Skip to content

ci: parallelize RSpec and merge worker coverage (#7173) - #7207

Open
augustocbx wants to merge 1 commit into
rubyforgood:mainfrom
augustocbx:7173-parallel-rspec-ci
Open

augustocbx wants to merge 1 commit into
rubyforgood:mainfrom
augustocbx:7173-parallel-rspec-ci

Conversation

@augustocbx

Copy link
Copy Markdown
Contributor

What github issue is this PR for, if any?

Refs #7173 (Phase 1 only; Phases 2 and 3 remain open).

What changed, and why?

  • Prepare four test databases and run the RSpec suite in four processes to reduce CI wall time.
  • Write runtime data to separate worker logs, combine it after the suite, and cache it so later runs can balance groups by measured duration. A fresh run uses file size grouping until runtime data is available.
  • Keep SimpleCov resultsets separate per worker and collate all four before the Qlty upload, preserving complete coverage reporting.
  • Load spec_helper explicitly in parallel workers and add regression specs for the workflow and worker coverage paths.

How is this tested? (please write rspec and jest tests!) 💖💪

  • RAILS_ENV=test PARALLEL_TEST_PROCESSORS=4 bundle exec rake parallel:create parallel:load_schema — passed.
  • RAILS_ENV=test TEST_MAX_DURATION=60 RUN_SIMPLECOV=true bundle exec parallel_test spec --type rspec -n 4 --group-by filesize — 3,744 examples, 0 failures, 21 pending.
  • bundle exec rspec spec/config — 25 examples, 0 failures.
  • Combined the four worker runtime logs and verified runtime grouping (114, 116, 117, and 117 spec files). Collated all four coverage resultsets into coverage/.resultset.json.
  • bin/lint and actionlint .github/workflows/rspec.yml — passed.

Screenshots please :)

Not applicable; this changes CI configuration and coverage reporting only.

Follow-up work

Phases 2 and 3 remain tracked in #7173.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ruby Touches Ruby code 🧪 Tests Tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant