Skip to content

Update build.ps1 -test -project to be scoped to the project for running tests - #1742

Open
Steve Lee (SteveL-MSFT) wants to merge 2 commits into
mainfrom
stevel-msft-project-scoped-tests
Open

Steve Lee (SteveL-MSFT) wants to merge 2 commits into
mainfrom
stevel-msft-project-scoped-tests

Conversation

@SteveL-MSFT

Copy link
Copy Markdown
Member

When -Test and -Project are combined, the build currently scopes Rust projects but still runs the full Pester suite. This makes targeted validation unexpectedly expensive.

This change forwards the selected project metadata to the Pester runner and uses each project's relative path as the test scope. When -PesterTestGroup is also supplied, its groups are intersected with the selected project paths so the filters cannot broaden the run.

Focused Pester coverage verifies project path selection, group intersection, and incompatible project/group handling.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings October 8, 2026 00:43

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Empty selections can run all tests, and root-project group intersections are incorrectly rejected.

2 open findings
What changed in this PR

Scopes Pester runs to selected project paths during targeted builds.

Changes:

  • Forwards selected projects to the Pester runner.
  • Intersects project paths with Pester groups.
  • Adds focused Pester tests.
File Description
build.ps1 Forwards selected project metadata.
helpers.build.psm1 Applies project and group path filtering.
tests/​helpers.build.pester.tests.ps1 Tests Pester path selection behavior.

🧠 Review effort: Balanced


Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.

Comment thread build.ps1
Comment thread helpers.build.psm1
@SteveL-MSFT Steve Lee (SteveL-MSFT) changed the title Scope tests to selected projects Update build.ps1 -test -project to be scoped to the project for running tests Oct 8, 2026
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown

Code Coverage Report

No Rust files were changed in this PR.

🔵 Full Codebase Coverage

82% (good)

Metric Value
Total executable lines 19498
Lines covered by tests 16166
Coverage percentage 82%

Full codebase coverage measures all instrumented Rust lines across the project.

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.

2 participants