-
Notifications
You must be signed in to change notification settings - Fork 2
Fix plugin loading dependencies #40
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
Conversation
…o fail (for the issue that needs resolving)
There was a problem hiding this 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.
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:
previewlabelreleaselabelSemver-MinororSemver-Majorto control version bump🏷️ Add labels to control release notes:
enhancement,bug,breaking-change,dependenciesignore-for-releaseto suppress it from notes