Skip to content

test(solid): split the slow growth and round-trip test files, and time check:ci's parts in CI - #565

Merged
ixuz merged 3 commits into
mainfrom
split-slow-test-files
Nov 4, 2026
Merged

ixuz merged 3 commits into
mainfrom
split-slow-test-files

Conversation

@ixuz

@ixuz ixuz commented Nov 4, 2026

Copy link
Copy Markdown
Member

What and why

When the run has runners to spare, the check job is the last required job: npm run check:ci took 430–600 s when Turbo's cache missed, while the next jobs ended at about 300 s. Most of that is solid's test task, and most of that task was one file, solidDeckRepository.growth.test.ts. Vitest runs a file's tests one after another, so its growth tests ran in a row on one worker while the others sat idle. The round trip had the same problem: every release of the library in one file. This branch does what #562 proposes, in three commits.

  • The growth tests are in four files, by what they write: solidDeckRepository.cards, .decks, .formats and .progress.growth.test.ts. The setup they share moves to src/testing/deckWrites.ts. All 14 tests keep their names, sizes and assertions. growth() compares the CPU time of the test's own process, so running the files on separate workers doesn't change what a test measures.
  • The round trip is in four files, releaseDrafts.{1..4}.roundtrip.test.ts. The releases are dealt into them by the size of their Turtle, the largest first, each to the smallest file so far, so the large taxonomy and Solid Fundamentals versions are spread out. The dealing is deterministic and lives in src/testing/releaseShards.ts. Its test holds that every release is in exactly one shard, and that there is a file for each shard and no other, so no release is dropped or run twice.
  • check:ci's parts are steps of their own in the check job: check:lints, check:tasks and check:repository, so the jobs API shows how long each takes. npm run check and check:ci call the same scripts, so a local run and CI run the same things. A later part still runs when an earlier part fails, so a run shows every failure, but none runs after npm ci or npm audit signatures fails.
  • Docs: testing.md gives the check job's parts. Its conventions now say that a file of slow tests is split into files of about the same time, with their setup in src/testing/.

Closes: #562

ixuz added 3 commits November 4, 2026 14:00
Vitest runs a file's tests one after another, so the fourteen growth
tests of solidDeckRepository.growth.test.ts ran in a row on one worker
while the others sat idle, and that one file took most of the solid
package's test task, the longest Turbo task of the check job.

They are now four files, by what they write: a deck's cards
(releases added or refused, distractors changed, cards removed), whole
decks (removed and changed in a catalog), older formats brought up to
date, and a learner's study (review states, answers, chapters). The
setup they share moves to src/testing/deckWrites.ts. Every test keeps
its name and assertions; growth() compares the CPU time of the test's
own process, so running the files on separate workers doesn't change
what a test measures.

Refs: #562
… files

releaseDrafts.roundtrip.test.ts took every release of the library in
one file, so test:roundtrip ran them one after another on one worker,
in the check job and in solid-memo-client's.

The releases are now dealt into four files by the size of their Turtle,
the largest first, each to the smallest file so far, so the large
taxonomy and Solid Fundamentals versions spread over the files. The
dealing is deterministic and lives in src/testing/releaseShards.ts,
whose test holds that every release is in exactly one shard and that
there is a file for each shard and no other, so no release is dropped
or run twice.

Refs: #562
The check job ran npm run check:ci as one step, so the jobs API, which
anyone can read, gave one time for the lints, every Turbo task and the
repository's checks together; finding the slow part took a local run.

check:ci's parts are now scripts of their own, check:lints, check:tasks
and check:repository, which npm run check and check:ci both call, so a
local run and CI run the same things. The check job runs each as its
own step, the later ones also when an earlier one failed, so a run
still shows every failure, and coverage:summary still reports after
the tests.

Closes: #562
@ixuz ixuz added enhancement New feature or request ci/cd Countinuous integration and deployment labels Nov 4, 2026
@ixuz
ixuz added this pull request to the merge queue Nov 4, 2026
Merged via the queue into main with commit 836d73a Nov 4, 2026
90 of 98 checks passed
@ixuz
ixuz deleted the split-slow-test-files branch November 4, 2026 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci/cd Countinuous integration and deployment enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The check job waits on one test file: solid's deck repository growth tests run one after another

1 participant