ci: verify examples and Copilot integration tests - #931
ci: verify examples and Copilot integration tests#931Michelle Clayton (michelle-clayton-work) wants to merge 7 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a scheduled GitHub Actions workflow that runs a minimal GitHub Copilot-backed example end-to-end via the existing cmd/verifyexamples harness, to continuously validate the Copilot provider integration without external secrets or Azure/Foundry setup.
Changes:
- Add a new Copilot “function tool canary” example that exposes a fixed tool result and prompts Copilot to include it in the final response.
- Register the new example in
cmd/verifyexampleswith output assertions to validate the run. - Add a new scheduled/manual GitHub Actions workflow to execute the example and upload logs/reports as artifacts.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| examples/02-agents/providers/github-copilot/function_tool/main.go | New minimal Copilot-backed agent example with a single fixed function tool and locked-down session config. |
| examples/02-agents/providers/github-copilot/function_tool/main_test.go | Unit test to verify the function tool returns the expected canary string. |
| cmd/verifyexamples/examples.go | Adds the Copilot canary example to the 02-agents verifyexamples set with must-contain / must-not-contain assertions. |
| .github/workflows/live-examples.yml | New scheduled/manual workflow that installs Copilot CLI, runs verifyexamples for the canary, writes a job summary, and uploads artifacts. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This comment has been minimized.
This comment has been minimized.
13490ce to
12076d7
Compare
This comment has been minimized.
This comment has been minimized.
Quim Muntal (qmuntal)
left a comment
There was a problem hiding this comment.
Like the direction 😸
6b659f4 to
c91d3aa
Compare
API Consistency ReviewScope: internal-only (CI workflows and tests) Changed Go contract: None — no exported Go identifiers were added, removed, or modified. The PR adds two GitHub Actions workflow files ( Upstream evidence reviewed: The PR description cites Result: Out of scope — the change is limited to CI configuration and tests with no user-visible Go API or behavior change. No parity issues identified.
|
| @@ -708,14 +708,13 @@ var agentsExamples = []ExampleDefinition{ | |||
| SkipReason: "Spawns a local stdio MCP server subprocess (go run) that requires live Foundry credentials.", | |||
There was a problem hiding this comment.
Why the changes in this file?
| if [[ "$EXAMPLES_OUTCOME" != "success" ]]; then | ||
| echo "Example verification failed." | ||
| exit 1 | ||
| fi No newline at end of file |
There was a problem hiding this comment.
Add a new line at the end of the file.
| }) | ||
| session := newE2ESession(t, canaryAgent, client) | ||
|
|
||
| ctx, cancel := context.WithTimeout(t.Context(), 2*time.Minute) |
There was a problem hiding this comment.
Don't hardcode timeouts. The testing framework already cancels the t.Context() when the test should time out. Adding another source of cancellation only adds noise. Same for subsequent WithTimeout Calls.
|
|
||
| - name: Install Copilot CLI | ||
| shell: bash | ||
| run: npm install --global @github/copilot@1.0.75 |
There was a problem hiding this comment.
Can we make this version handled by dependabot?
|
|
||
| - name: Install Copilot CLI | ||
| shell: bash | ||
| run: npm install --global @github/copilot@1.0.75 |
There was a problem hiding this comment.
Can we make this version handled by dependabot?
Summary
Add scheduled and manually dispatched CI that runs every example supported by the configured credentials. Add GitHub Copilot provider integration tests to the normal test workflow.
The first provider covered is GitHub Copilot. Both workflows use the short-lived
${{ github.token }}withcopilot-requests: write, so they require no repository secret, API key, Foundry project, or Azure setup.Example verification
live-examples.ymlruns the existingcmd/verifyexamplescommand without a name filter. Examples for providers without configured credentials skip with their existing reasons.Two fixed-input number-guessing examples now use their existing deterministic output checks instead of requiring Foundry semantic grading.
A validated run executed 24 available examples and skipped 83 unavailable examples with explicit reasons:
https://github.com/microsoft/agent-framework-go/actions/runs/33197392893
Copilot integration tests
Port all tests from the .NET Agent Framework
GitHubCopilotAgentTests.csintoprovider/copilotprovider/agent_e2e_test.go:These tests run in a dedicated Linux job in
.github/workflows/test.yml. Ordinary test runs skip them. GitHub Actions runs them whenGITHUB_TOKENis available, and developers can opt in locally withRUN_COPILOT_INTEGRATION_TESTS=true.The integration job does not run for fork pull requests because it executes checked-out code with Copilot access.
Authentication and safety
Validation
go test -count=1 ./...go vet ./cmd/verifyexamples ./provider/copilotprovidergit diff --checkNine active Copilot integration tests passed. The remote MCP case skipped as intended.
Upstream reference