Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepare playground apps to allow testing #5080

Merged
merged 13 commits into from
Jul 31, 2024

Conversation

radical
Copy link
Member

@radical radical commented Jul 25, 2024

This PR has changes to prepare the playground/ apps to be run as part of future tests in Aspire.Playground.Tests. The changes follow these broad patterns:

  • remove all the per-project Directory.Build.{props,targets}, and instead of these ..

    • .. add root Directory.Build.{props,targets} and use Aspire.RepoTesting.*
    • And update all the playground projects to use AspireProjectOrPackageReference instead of ProjectReference
  • Aspire.Hosting.Testing expects to identify AppHost assemblies by a name ending in .AppHost.

    • rename some projects that don't follow that convention.
  • Update the apps to use Aspire.RepoTesting* which allows building outside of repo.

Microsoft Reviewers: Open in CodeFlow

.. with `.AppHost` suffix. `Aspire.Hosting.Testing` specifically looks
for a `.AppHost` suffix to identify apphost assemblies.
And use Aspire.RepoTesting.* to allow testing and this replaces the
per-project sdk imports.
@dotnet-issue-labeler dotnet-issue-labeler bot added the area-integrations Issues pertaining to Aspire Integrations packages label Jul 25, 2024
…ference. And skip Dashboard.csproj when building for testing
@radical radical marked this pull request as ready for review July 25, 2024 23:25
@radical
Copy link
Member Author

radical commented Jul 25, 2024

TODO

  • check that the playground apps are still runnable from VS

Copy link
Member

@eerhardt eerhardt left a comment

Choose a reason for hiding this comment

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

This looks awesome. I had a couple suggestions to make it even cleaner. Then I think we can merge it.

playground/AWS/AWS.AppHost/AWS.AppHost.csproj Outdated Show resolved Hide resolved
playground/AWS/AWS.AppHost/AWS.AppHost.csproj Outdated Show resolved Hide resolved
playground/mongo/Mongo.AppHost/Mongo.AppHost.csproj Outdated Show resolved Hide resolved
playground/Directory.Build.props Outdated Show resolved Hide resolved
.. `playground` `AppHost` projects by default, instead of doing that
individually in the project files.
.. automatically on `@(AspireProjectOrPackageReference)` items used in
`AppHost` projects.
@radical radical requested a review from eerhardt July 30, 2024 02:24
Instead of copying `src/Shared` to the test archive, keep a copy of
`src/Shared/KnownResourceNames.cs` in `playground` and use that instead.
Copy link
Member

@eerhardt eerhardt left a comment

Choose a reason for hiding this comment

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

Nice!

@radical radical merged commit 232e434 into dotnet:main Jul 31, 2024
11 checks passed
@radical radical deleted the playground-tests-prep branch July 31, 2024 20:49
@eerhardt eerhardt mentioned this pull request Jul 31, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Sep 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-integrations Issues pertaining to Aspire Integrations packages testing ☑️
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants