-
Notifications
You must be signed in to change notification settings - Fork 670
Make verify tool accessible to the coding agent #9753
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
Co-authored-by: davidfowl <95136+davidfowl@users.noreply.github.com>
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 integrates the Verify snapshot tool into the Copilot setup workflow and documents how to use it for accepting snapshot updates.
- Installs the
verify.tool
global .NET tool in the CI setup. - Adds a “Snapshot Testing with Verify” section to the Copilot instructions.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
.github/workflows/copilot-setup-steps.yml | Added a step to install the Verify global tool |
.github/copilot-instructions.md | Documented snapshot testing usage with dotnet verify |
# Install verify tool for snapshot testing | ||
- name: Install verify tool | ||
run: dotnet tool install -g verify.tool | ||
|
||
# Include PrepareForHelix to maximise what is downloaded here |
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.
After installing a global .NET tool, you need to add its install directory ($HOME/.dotnet/tools
) to the PATH. Add a step like:
- name: Add .NET tools to PATH
run: echo "$HOME/.dotnet/tools" >> $GITHUB_PATH
# Include PrepareForHelix to maximise what is downloaded here | |
- name: Add .NET tools to PATH | |
run: echo "$HOME/.dotnet/tools" >> $GITHUB_PATH | |
# Include PrepareForHelix to maximise what is downloaded here |
Copilot uses AI. Check for mistakes.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@danmoseley this is failing copilot setup - https://github.com/dotnet/aspire/actions/runs/15542423162/job/43756124976 |
hmmmm |
We can run this after the build step using |
I should have done a test copilot setup before merging this. What's more, copilot review suggested the problem.. |
This PR adds the verify tool to the copilot setup workflow and provides documentation for snapshot testing usage.
Changes Made
Added verify tool installation to copilot setup workflow (
.github/workflows/copilot-setup-steps.yml
):verify.tool
globally before the build stepUpdated copilot instructions (
.github/copilot-instructions.md
):Snapshots
directories)dotnet verify accept -y
to accept pending snapshot changesBackground
The repository already uses the Verify library (Verify.XunitV3 version 30.3.0) extensively for snapshot testing, with verified snapshot files in multiple test projects including:
tests/Aspire.Hosting.Azure.Tests/Snapshots/
tests/Aspire.Hosting.Docker.Tests/Snapshots/
tests/Aspire.Hosting.Kubernetes.Tests/Snapshots/
When coding agents modify tests that use snapshot testing, they need a way to accept the new snapshots. The verify tool provides this capability through the
dotnet verify accept -y
command.Fixes #9621.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.