Add E2E test pipeline for azure.ai.agents extension (Tier 0/1)#8607
Add E2E test pipeline for azure.ai.agents extension (Tier 0/1)#8607v1212 wants to merge 9 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a new GitHub Actions workflow to run end-to-end (E2E) scenario-based checks for the azure.ai.agents azd extension on PRs and via manual dispatch, intended to cover Tier 0 (offline) and Tier 1 (Azure-authenticated, no provision) scenarios, with a commented Tier 2 placeholder.
Changes:
- Introduces
.github/workflows/e2e-ext-azure-ai-agents.ymlwith Tier 0 and Tier 1 jobs that buildazd, install the extension, and execute scenario YAMLs. - Adds
workflow_dispatchinput scaffolding for a future Tier 2 live-Azure run (currently commented out).
68aab86 to
03fe499
Compare
Copilot CLI-driven pipeline using cli-interactive-tester MCP tool. Same architecture as local testing — Copilot reads scenario goals and drives terminal via MCP protocol. Implementation: - Copilot CLI installed via npm install -g @github/copilot - Auth via COPILOT_GITHUB_TOKEN (Fine-grained PAT, Copilot Requests perm) - MCP config in ~/.copilot/mcp-config.json (auto-loaded by Copilot) - Execution: copilot -p prompt --allow-tool=... --no-ask-user - workflow_dispatch with tier selector (0 / 0+1 / 0+1+2) - ubuntu-22.04 runner - Checkout: trangevi/test-scenarios (until PR Azure#8524 merges) - Tier 2 has always-run teardown for Azure resource cleanup - Results uploaded as artifacts TODO: - Confirm --allow-tool syntax for MCP-registered tools - Configure COPILOT_PAT secret (Fine-grained PAT) - Confirm cli-interactive-tester repo visibility - Create prompt-ci-run.md in scenarios directory Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
03fe499 to
5d996f5
Compare
- Add setup-node + npm install -g @github/copilot - Use COPILOT_GITHUB_TOKEN env var with COPILOT_PAT secret - MCP config at ~/.copilot/mcp-config.json (auto-loaded) - Use copilot -p with --allow-tool and --no-ask-user - Add conditional on Azure Login (skip for Tier 0) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Use printf instead of heredoc to avoid leading whitespace in profile.local.yaml and mcp-config.json - Fix concurrency group to prevent parallel runs (was using run_id) - Add existence check for prompt-ci-run.md before Copilot invocation Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Create CI-adapted prompt file for Copilot CLI execution - Pass TIER input as env var so Copilot knows which phases to run - Prompt includes profile loading, scenario ordering, and output format Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
cwd may not be supported by Copilot CLI's MCP config schema. Use bash wrapper to cd before launching the MCP server. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Review findingsThis is a draft targeting 🔴 Concrete bug —
|
Required for azure/login OIDC federated credentials (Tier 1/2). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Remove id-token:write (not needed for Tier 0) - Comment out Tier 1/2 steps with TODO explaining ADO vs GHA decision - Fix Azure#3: teardown glob guard with warning (commented out) - Fix Azure#4: secrets via env: not inline shell (commented out) - Fix Azure#5: pin node-version: 20 - Fix Azure#7: use GITHUB_PATH instead of per-step export Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
All tiers (0/1/2) are now active — if team decides GHA is not appropriate for authenticated workloads, PR can be abandoned. Fixes from Glen's review: - id-token: write restored (required for azure/login OIDC) - Teardown: glob guard with ::warning:: instead of silent || true - Secrets: passed via env: instead of inline shell interpolation - setup-node: pin node-version 20 - PATH: use GITHUB_PATH once instead of per-step export - Create test profile: add if: condition (skip for Tier 0) - Trailing whitespace cleaned Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Thanks @glharper, great review! Addressed all items in the latest commit (d08b5c9). Here's the breakdown: 🔴 id-token: write — Fixed. Added to permissions block. 🟠 ADO convention — Totally valid point. I'm aware of the convention in AGENTS.md. This PR's goal is to validate whether this pattern (Copilot driving cli-interactive-tester to exercise azd interactively) works end-to-end in GitHub CI. If the team decides authenticated tiers should move to ADO, I'm fully supportive of that. Happy to discuss in our next sync. 🟠 Teardown glob — Fixed. Now uses explicit guard with ::warning:: annotation instead of silent || true. 🟡 Secret interpolation — Fixed. Secrets now passed via env: block, referenced as ${VAR} in shell. 🟡 Node version — Pinned to node-version: '20'. 🟡 PATH — Switched to >> $GITHUB_PATH in the build step, removed per-step exports. 🟡 Hardcoded ref — Keeping TODO as-is, will update once #8524 merges. Re: overall direction — This is still a draft targeting a staging branch for all tests with the MCP tool and copilot driven framework. If later it is determined to move tier 1/2 tests to ADO, I would propose to abandon this PR but implement same pipeline in ADO for tier 0/1/2, leaving only tier 0 in GitHub action seems not helpful enough. |
- Fail fast if Tier 2 selected without confirm_tier2_cost=true - Clarify that Azure/GitHub auth is only active for Tier 1/2 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
https://github.com/v1212/azure-dev/actions/runs/27403167828 validated the pipeline in fork repo, it proved the testing framework working with copilot, mcp tool, and test cases. @glharper |
|
Hi @@v1212. Thank you for your interest in helping to improve the Azure Developer CLI experience and for your contribution. We've noticed that there hasn't been recent engagement on this pull request. If this is still an active work stream, please let us know by pushing some changes or leaving a comment. Otherwise, we'll close this out in 7 days. |
Summary
Adds a Copilot CLI-driven E2E test pipeline for the azure.ai.agents extension. Uses the official
copilot -pprogrammatic mode (per GitHub docs).Architecture (identical to local testing)
Workflow
copilot -p "" --allow-tool='cli-interactive-tester(*)' --no-ask-userTrigger
Items to confirm
cli-interactive-tester(*)?)Secrets needed
COPILOT_PAT(Fine-grained PAT with "Copilot Requests" permission)AZURE_CLIENT_ID/AZURE_TENANT_ID/AZURE_SUBSCRIPTION_IDFOUNDRY_PROJECT_ENDPOINTGH_TOKEN(for gh auth + manifest-url scenario)Validation
All 44 scenarios validated PASS in manual Copilot-driven local run.