Skip to content

CI: split tests into fast and analysis-heavy lanes#927

Merged
erikdarlingdata merged 2 commits intodevfrom
feature/ci-fast-test-lane
May 3, 2026
Merged

CI: split tests into fast and analysis-heavy lanes#927
erikdarlingdata merged 2 commits intodevfrom
feature/ci-fast-test-lane

Conversation

@erikdarlingdata
Copy link
Copy Markdown
Owner

Summary

  • Splits Lite test execution into a fast lane (always runs, <1 min) and an analysis-heavy lane (only runs when relevant paths change).
  • Heavy classes — AnomalyDetectorTests, FactCollectorTests, FactCollectorMiseryTests, BaselineProviderTests, InferenceEngineTests, ScenarioTests, AnalysisServiceTests — account for ~6 of the 8 test minutes. The logic underneath rarely changes, so they're gated on edits to Lite/Analysis/**, Lite/Services/**, Lite/DuckDb/**, Lite/Models/**, Lite.Tests/**, or Lite/PerformanceMonitorLite.csproj.
  • Cheap classes always run: HealthCalculator, FactScorer, FinOps, FindingStore, DismissReliability, DismissedArchiveSidecar, AlertHistorySource, DuckDbSchema.
  • Wires Installer.Tests into CI for the first time (it existed but was never executed). Gated on changes to Installer/**, Installer.Core/**, Installer.Tests/**, install/**, or upgrades/**. Generated packages.lock.json so it joins the existing NuGet cache + --locked-mode flow.
  • Release builds force-run everything as a safety net.
  • Nightly is unchanged — full suite always runs.

Expected impact

  • PRs that don't touch analysis code (Dashboard tweaks, helper fixes, install-only changes, doc edits, CI tweaks): test step drops from ~8 min to ~1 min.
  • PRs that touch analysis code: same ~8 min as today.
  • Releases and nightlies: unchanged, run everything.

Test plan

  • This PR itself touches only .github/workflows/build.yml and Installer.Tests/packages.lock.json, so the heavy Lite lane should be skipped on this build. Verify in the run log.
  • The Installer lane should also be skipped (no installer/install/upgrades touched).
  • Cheap Lite tests should run and pass.
  • Open a follow-up dummy PR touching Lite/Services/AnomalyDetector.cs (or rebase a feature branch that does) to confirm the heavy lane fires.

🤖 Generated with Claude Code

Heavy Lite test classes (AnomalyDetector, FactCollector*,
BaselineProvider, InferenceEngine, Scenario, AnalysisService) only run
when paths under Lite/Analysis, Lite/Services, Lite/DuckDb, Lite/Models,
or Lite.Tests change. Those tests dominate the build at ~5-6 of the 8
test minutes, but the logic underneath rarely changes.

Cheap Lite tests (HealthCalculator, FactScorer, FinOps, FindingStore,
Dismiss*, AlertHistorySource, DuckDbSchema) always run — together they
finish in well under a minute.

Also wires Installer.Tests into CI for the first time, gated on changes
to Installer/, Installer.Core/, Installer.Tests/, install/, or upgrades/.
Generated packages.lock.json so the project participates in --locked-mode
restore + NuGet caching.

Releases force-run everything regardless of paths.
VersionDetectionTests, IdempotencyTests, and AdversarialTests require a
running SQL Server instance via TestDatabaseHelper, which the GitHub
runner doesn't provide. Filter to only the pure-logic classes
(UpgradeOrderingTests, FileFilteringTests) which already passed in the
prior run.
@erikdarlingdata erikdarlingdata merged commit e74ad7a into dev May 3, 2026
2 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