Skip to content

Improve affected test selection for TypeScript AppHost files#1379

Open
aaronpowell wants to merge 1 commit into
mainfrom
aaronpowell/review-test-detection
Open

Improve affected test selection for TypeScript AppHost files#1379
aaronpowell wants to merge 1 commit into
mainfrom
aaronpowell/review-test-detection

Conversation

@aaronpowell
Copy link
Copy Markdown
Member

Closes: N/A

TypeScript AppHost example changes were triggering a full integration test matrix because examples/...AppHost.TypeScript/apphost.mts files were not mapped to a test project. This update makes test selection smarter so those changes select only affected tests.

The selector now resolves TypeScript example apphost paths to their matching .AppHost project when possible and adds a fallback map built from tests/**/TypeScriptAppHostTests.cs argument metadata (exampleName and appHostProject). That fallback ensures TypeScript fixture changes still map to the correct test project even when there is no direct project-reference edge.

PR Checklist

  • Created a feature/dev branch in your fork (vs. submitting directly from a commit on main)
  • Based off latest main branch of toolkit
  • PR doesn't include merge commits (always rebase on top of our main, if needed)
  • New integration
    • Docs are written
    • Added description of major feature to project description for NuGet package (4000 total character limit, so don't push entire description over that)
  • Tests for the changes have been added (for bug fixes / features) (if applicable)
  • Contains NO breaking changes
  • Every new API (including internal ones) has full XML docs
  • Code follows all style conventions

Other information

No behavioral changes to test execution itself; this only narrows test selection for TypeScript AppHost example changes.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 29, 2026 02:49
@github-actions
Copy link
Copy Markdown
Contributor

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/CommunityToolkit/Aspire/main/eng/scripts/dogfood-pr.sh | bash -s -- 1379

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/CommunityToolkit/Aspire/main/eng/scripts/dogfood-pr.ps1) } 1379"

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR improves the affected-test selector so TypeScript AppHost example changes map to the relevant test projects instead of forcing the full integration test matrix.

Changes:

  • Adds TypeScript AppHost path resolution for examples/**/.AppHost.TypeScript/**.
  • Adds a fallback map from TypeScriptAppHostTests.cs metadata to affected test projects.
  • Removes unused changed-project helper code.
Show a summary per file
File Description
eng/testing/select-affected-tests.cs Adds TypeScript AppHost-to-test mapping logic and cleans up unused selection helpers.

Copilot's findings

  • Files reviewed: 1/1 changed files
  • Comments generated: 0

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