Skip to content

Conversation

@matt-goldman
Copy link
Owner

Summary

Intent of this PR was to ensure all plugin tests were configured correctly, in order to isolate and resolve the issue with loading dependencies of plugin projects. However fixing the assertions in the tests has verified this is working as expected.

PR now includes all tests passing, and adds a PR-test workflow.


🧷 This PR will be released as a preview by default.

To trigger a stable release:

  • Remove the preview label
  • Add the release label
  • Optionally add Semver-Minor or Semver-Major to control version bump

🏷️ Add labels to control release notes:

  • enhancement, bug, breaking-change, dependencies
  • Or use ignore-for-release to suppress it from notes

Copilot AI review requested due to automatic review settings August 14, 2025 23:23
@github-actions github-actions bot added the preview Triggers a release of preview version of Nuget packages label Aug 14, 2025
Copy link
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 fixes plugin loading dependencies by correcting test assertions and adds CI validation. The changes ensure plugin tests properly validate functionality and introduce automated testing on pull requests.

  • Corrected Assert.Contains usage to use lambda expressions instead of incorrect overloads
  • Added logging to test plugin for better debugging visibility
  • Added GitHub Actions workflow for automated PR testing

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 15 comments.

File Description
tests/Blake.IntegrationTests/Commands/BlakePluginTests.cs Fixed test assertions using proper Assert.Contains syntax with lambda expressions
tests/Blake.IntegrationTests/TestPluginWithDependencies/TestPluginWithDependencies.cs Added structured logging for better test debugging
.github/workflows/pr-tests.yml Added new CI workflow to run tests on pull requests

Added space before closing bracket in <TipContainer> tag
and improved readability of the ChildContent property.
Implement functionality to initialize a Blazor app in
`BlakeServeCommandTests.cs`. This includes handling the
initialization of a project with a specified `.csproj` file,
error handling for initialization failures, and the use of a
cancellation token for command execution.
Enhance Razor template in BlakeServeCommandTests.cs
by including the @using OptionsTest.Components directive,
allowing access to additional components for improved functionality.
This commit introduces a `CancellationToken` parameter to various asynchronous methods across multiple files, enhancing control over task cancellation and improving responsiveness. Key updates include:

- `InitProjectFile` in `ProjectFileBuilder.cs` now supports cancellation for file operations.
- Similar updates in `SampleContentBuilder.cs`, `SiteGenerator.cs`, and `TemplateService.cs` for long-running tasks.
- Logging statements have been modified to ensure consistent logging without null checks on the logger.
- The main execution flow in `Program.cs` has been updated to manage cancellation tokens, allowing for graceful shutdowns.

These changes collectively improve the application's resource management and logging consistency.
Updated `Program.cs` to log the target path for baking the Blake site, improving traceability. Replaced instances of `RunBlakeFromDotnetAsync` with `RunBlakeCommandAsync` in `BlakeServeCommandTests.cs` for better argument handling. Adjusted test assertions to match the new logging format, enhancing clarity and maintainability.
@matt-goldman matt-goldman merged commit b08aa3c into main Aug 15, 2025
2 checks passed
@matt-goldman matt-goldman deleted the fix-plugin-loading-dependencies branch August 15, 2025 05:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Blake.BuildTools Blake.CLI enhancement New feature or request preview Triggers a release of preview version of Nuget packages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants