Skip to content

ci: run tiny test jobs together to cut 36 jobs per push - #67632

Draft
susnux wants to merge 5 commits into
masterfrom
ci/merge-tiny-jobs
Draft

susnux wants to merge 5 commits into
masterfrom
ci/merge-tiny-jobs

Conversation

@susnux

@susnux susnux commented Dec 3, 2026

Copy link
Copy Markdown
Contributor
  • Resolves: #

Summary

About half of the jobs a PR spawns finish in under 1.5 minutes, and most of that time is checkout, PHP and composer setup rather than testing. On weekdays our ubuntu-latest runner pool is saturated (p90 queue time 17–65 minutes on Dec 1–2), so every job a push spawns adds to the wait for everyone.

This PR runs the tiniest test jobs together, which cuts a full push from about 173 to about 137 jobs. Test coverage stays the same, and the required summary checks keep their names, so branch protection needs no change.

Workflow Before After Change
integration-sqlite 42 20 the 13 suites with < 1 min of behat time run in two shared jobs (general, LDAP) per PHP version
PHPUnit memcached 2 0 runs inside the nodb job, after reinstalling with the memcached config
PHPUnit kvstore 6 2 all three Valkey topologies start side by side; one job per PHP version tests them one after another
DAV (CalDAVTester) 8 2 one job per PHP version runs all service/endpoint combinations
Litmus 4 2 one job per PHP version tests both endpoints

Isolation is kept: every suite, topology, CalDAVTester combination and litmus endpoint gets a freshly installed instance, just as it had in its own job. The loops don't stop at the first failure. Each failed part is reported as an ::error:: annotation with its Nextcloud log printed right away, because the next part's reinstall replaces the data directory.

Each workflow is changed in its own commit, so individual parts can be dropped or split into separate PRs if preferred.

Measurements (last 7 days, 40 sampled master PR pushes): p50 140 jobs and 485 runner-minutes per push. Tiny jobs: kvstore and memcached each spend ~0.1 min in tests, the 13 bucketed integration suites 0.2–0.9 min, DAV runs 0.3–0.5 min, litmus 1.5 min, each next to about 1–1.3 minutes of job setup.

Not included:

  • files-external / object-storage light backends: they pick the backend inside one job definition through GITHUB_ENV, so merging them is a bigger refactor; follow-up.
  • Running only one PHP version for non-DB suites, which would trade coverage.

TODO

  • Check in this PR's CI that all bucketed suites, kvstore topologies, CalDAVTester combinations and litmus endpoints actually ran (expand the log groups)
  • Compare job durations against the current master jobs

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI
Validation done before opening
  • actionlint 1.7.7 (with shellcheck) on all changed workflows: no new findings; the remaining ones are in the existing "Print logs" step of integration-sqlite.
  • The bucket loop was checked with a stub run.sh: comma separation, --tags ~@large files_features argument splitting, continuing after a failed suite, and a non-zero exit when any suite failed.
  • The LDAP suites only read the directory shipped with the openldap image, so sharing the service container between them is safe.

Assisted by ClaudeCode:claude-opus-5-5

🤖 Generated with Claude Code

Thirteen of the 21 integration suites spend less than a minute in behat,
while every job pays about a minute for checkout, PHP and composer setup.
Running them one after another in two jobs per PHP version removes 22
jobs per push. Each suite still starts on a freshly installed instance,
so no state leaks between suites, and the job keeps going after a failed
suite so all failures are reported.

Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
The memcached group finishes in a few seconds, so its own job per PHP
version was almost entirely setup. The nodb job now reinstalls with the
memcached configuration after its own tests and runs the group there,
which drops two jobs per push without changing what is tested.

Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Each topology job spent about a minute on setup for a few seconds of
tests. The single server, cluster and sentinel setups now run side by
side on distinct ports, and one job per PHP version tests them one after
another on a fresh instance each, which drops four jobs per push.

Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Every service and endpoint combination needed its own job because
CalDAVTester cannot run twice against the same instance, yet each test
run takes well under a minute. Reinstalling Nextcloud between runs
inside one job gives the same isolation and drops six jobs per push.

Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
The litmus run per endpoint is shorter than the job setup around it.
Testing both endpoints in one job, each against a fresh instance, drops
two jobs per push. The job name now also shows the PHP version, which
was missing before.

Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants