You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(ci): run test selection before enumerate-tests; enumerate only selected projects
SelectTests ran after enumerate-tests and filtered the already-built full matrix.
But enumerate-tests does a full `./build.sh -test` to shard every test project,
so the expensive work happened regardless of the selection.
Invert the order. SelectTests now runs first (after checkout+restore), computes
the affected test projects from the diff (Layer 1 graph + curated map), and in
enforce mode writes an OverrideProjectToBuild props file. enumerate-tests then
reuses the job's checkout+restore and builds/enumerates ONLY the selected
projects via $(BeforeBuildPropsPath) -- the same hook the quarantine/outerloop
runners use. In audit mode no props are written and enumerate-tests produces the
full matrix unchanged.
SelectTests contract:
- The test-project universe (ALL-expansion + existence guard) now comes from
Aspire.slnx (tests/*.Tests), not an enumerated matrix, since the selector runs
before enumeration.
- Dropped --matrix/--output; added --before-build-props. Emits a before_build_props
output so the workflow passes /p:BeforeBuildPropsPath to enumerate-tests.
- run_* job booleans are unchanged and still drive the non-.NET job gates.
enumerate-tests action gains checkout/restore/beforeBuildPropsPath inputs; defaults
preserve deployment-tests.yml. tests.yml shares one checkout+restore so the props
file survives (a fresh checkout's git clean would remove it).
Also:
- Move the curated map docs/ci/test-trigger-map.yml -> eng/test-trigger-map.yml
and update all references.
- Ignore **/*.md and the map file itself, so doc/map edits no longer appear as
unattributed changed files.
- Flip ENFORCE_SELECTION to 'true'.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copy file name to clipboardExpand all lines: .github/actions/enumerate-tests/action.yml
+18Lines changed: 18 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,18 @@ inputs:
6
6
type: string
7
7
default: ''
8
8
description: 'Additional MSBuild arguments passed to the test matrix generation step (e.g., /p:IncludeTemplateTests=true /p:OnlyDeploymentTests=true)'
9
+
checkout:
10
+
required: false
11
+
default: 'true'
12
+
description: 'Whether to check out the repo. Set false when the caller has already checked out (e.g. a prior select-tests step in the same job whose working tree must be preserved).'
13
+
restore:
14
+
required: false
15
+
default: 'true'
16
+
description: 'Whether to set up .NET and run ./restore.sh. Set false when the caller has already restored in the same job.'
17
+
beforeBuildPropsPath:
18
+
required: false
19
+
default: ''
20
+
description: 'Path to an OverrideProjectToBuild props file (imported by eng/Build.props via $(BeforeBuildPropsPath)) that restricts the -test build, and thus the enumeration, to a subset of test projects. Empty enumerates everything.'
9
21
10
22
# Output format: JSON with structure {"include": [{...}, ...]}
0 commit comments