Speed up CI: split tests across machines + fix hot spec files (cruft removal won't help)
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 30/100
調査の方向性
Start with the timing table: the hot spec files are spec/requests/dedupable_spec.rb, spec/services/tag_alias_seeder_spec.rb and spec/requests/events_spec.rb, and the test step runs under parallel_rspec. Splitting jobs across matrix runs means changing the CI workflow, which the payload does not name, so confirm the maintainers want that before starting. Done means a measured drop in wall-clock CI time, with the 17 pending examples handled separately.
索引モデルが issue の本文から書いたものです。
説明
🤖 From Claude:
CI takes 11–13 min. Deleting old/redundant specs won't fix that: removing every cruft candidate saves only about 25s. The time goes to the test step itself and a handful of slow spec files.
Measured from the per-example timing files of one green CI run (12,769 examples).
Where the time goes (one run, 11 min total)
| Step | Time |
|---|---|
| Setup (containers, Ruby, npm, Vite build, DBs) | ~1:40 |
parallel_rspec, 4 processes |
9:21 |
- Total example time is 34.6 min, split 4 ways. Processes finished between 7:50 and 9:14.
- By directory: requests 16.2 min (47%), services 8.0, system 3.8, models 3.4, everything else ~3.
- Factories are cheap (2–40ms per
create), so they aren't the cause.
Cruft: low value
| Candidate | Examples | Total time | Wall-clock saved |
|---|---|---|---|
| Auth-gate request specs (guest / regular user / denied) | 463 | 1.0 min | ~15s |
| View specs | 563 | 0.5 min | ~8s |
| Scaffold-style request specs | 101 | 0.1 min | ~2s |
| Pending/skipped examples | 17 | 0 | 0 |
- Delete or fix the 17 pending examples for hygiene. It won't speed anything up.
- Keep the auth-gate specs. They're cheap and check the real routing and redirects.
Real levers
-
Split tests across 2–3 GitHub Actions matrix jobs (biggest win)
- 2 machines × 4 processes → tests ~4.5 min, CI ~6.5 min. 3 machines → CI ~5 min.
- Repo is public, so standard runners are free.
parallel_rspec --only-grouplets each job take a share.
-
Speed up the hot files. The top 12 files are ~35% of all example time:
File Time Examples Per example spec/requests/dedupable_spec.rb124s 113 ~1.1s spec/requests/events_spec.rb81s 413 spec/services/event_registration_services/public_registration_spec.rb77s 110 0.7s spec/requests/people_dedupe_professional_licenses_spec.rb68s 31 2.2s spec/services/event_dashboard_spec.rb57s 143 spec/services/tag_alias_seeder_spec.rb46s 23 2s (runs the whole seeder in every example) - Running heavy setup once per file instead of once per example could roughly halve these, saving ~1.5 min wall clock.
-
Group by runtime instead of file size
- Record a runtime log (
ParallelTests::RSpec::RuntimeLogger) and use--group-by runtime. - Evens out the 7:50 vs 9:14 spread, saving ~30–40s.
- Record a runtime log (
-
Two slow system specs (11–13s each), low priority
community_news_index_spec.rb:170andnotification_incoming_responded_spec.rb:8.- Probably slow only because they run first in their process and wait for Chrome to start.
- 主要言語
- Ruby
- スター
- 15
- フォーク
- 28
- 平均マージ
- 14時間 29分
- マージ済み PR(30日)
- 292
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
rubyforgood/awbw のほかの issue
-
blocked
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
rubyforgood/awbw#2824 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
rubyforgood/awbw#2822 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
rubyforgood/awbw#2160 ·
メンテナーはふだん 1 日以内に返信
-
Update callout faq defualt text when the new person subscription launches対応中かも @maebeale が 98 日前に担当しました。 オープンblocked
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
rubyforgood/awbw#2095 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
rubyforgood/awbw#2088 ·
メンテナーはふだん 1 日以内に返信
rubyforgood/awbw の issue をすべて見る
似ている issue
-
Bug Ruby
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
getsentry/sentry-ruby#3211 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
internetee/registry#2984 ·
メンテナーはふだん 6 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
ecosyste-ms/issues#862 ·
メンテナーはふだん 1 日以内に返信
-
Redis Lua error `@user_script:52: ERR value is not an integer or out of range` when `window_size` is configured対応中かも @mimosa が今日担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
riscv/riscv-unified-db#2829 ·
メンテナーはふだん 1 日以内に返信