Skip to content

ci: run the test suite as parallel sections by area - #1101

Merged
ZhuchkaTriplesix merged 1 commit into
devfrom
ci/parallel-test-sections
Oct 7, 2026
Merged

ZhuchkaTriplesix merged 1 commit into
devfrom
ci/parallel-test-sections

Conversation

@ZhuchkaTriplesix

Copy link
Copy Markdown
Member

Summary

The CI test job ran all 297 test files one after another on a single runner, so one slow or hung test held everything up. Tests now run as parallel jobs by area.

  • scripts/ci/test_sections.sh defines the sections as sets of test directories:
    • core-data: database, storage, security, actions, app, json, csv, util
    • core-extensions: extensions, market, sdui, updater, features/extensions, features/updater
    • core-theme: theme, shared widgets
    • core-ui: motion, layout, ui, editor, widgets, platform, demo
    • features-workspace: workspace, sql_workspaces, sqlite, mysql, postgresql
    • features-nosql: mongodb, redis, nosql
    • features-app: main_screen, connections, settings, command_palette, onboarding, macos, help
    • rest: everything no section claims (so a test in a new directory still runs)
  • ci.yml: a test-sections matrix runs flutter test --exclude-tags=golden <section paths> per section (fail-fast: false, so every section reports).
  • The job named Run Tests is kept as the single aggregate check: it passes only when all sections and the coverage check pass, so branch rules and the PR checks list keep working. build-linux-release still depends on it.
  • Test sections cover all tests runs scripts/ci/test_sections.sh check, which fails if a test file belongs to no section or to two.
  • CONTRIBUTING.md explains how to run one section locally.

Notes

  • Each section repeats Flutter setup and pub get (about a minute), so total runner time grows while wall-clock time drops to roughly the slowest section.
  • A hung test still holds its own section until its timeout.

Split the single Run Tests job into a matrix of sections (core-data,
core-extensions, core-theme, core-ui, features-workspace, features-nosql,
features-app, rest) defined in scripts/ci/test_sections.sh. 'Run Tests' stays as
the single required check and passes only when every section passes; a
coverage job fails if a test file is in no section or in two. Tests in a
directory no section lists still run in 'rest'.
@ZhuchkaTriplesix
ZhuchkaTriplesix merged commit 88c6444 into dev Oct 7, 2026
7 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant