-
Notifications
You must be signed in to change notification settings - Fork 267
[Extensions] Add ability to test using ci-test.ps1 #6560
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
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 pull request adds the infrastructure to support running tests for azd extensions via a ci-test.ps1 script in the CI/CD pipeline. The change introduces a SkipTests parameter to allow extensions without tests to bypass test execution, and updates the build pipeline to execute the test script.
Changes:
- Added
SkipTestsboolean parameter to the extension release pipeline template - Modified the build job to execute
ci-test.ps1instead of a placeholder message - Removed conditional logic from Go setup step that was tied to
Skip.LiveTestvariable - Added
SkipTests: trueto all existing extension pipelines except the demo extension - Created a template
ci-test.ps1file for the demo extension
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| eng/pipelines/templates/stages/release-azd-extension.yml | Adds SkipTests parameter to the extension release stage template |
| eng/pipelines/templates/jobs/build-azd-extension.yml | Replaces placeholder test step with actual ci-test.ps1 execution and removes conditional Go setup |
| eng/pipelines/release-ext-microsoft-azd-extensions.yml | Sets SkipTests to true for the extensions bundle |
| eng/pipelines/release-ext-microsoft-azd-concurx.yml | Sets SkipTests to true for the concurx extension |
| eng/pipelines/release-ext-microsoft-azd-ai-builder.yml | Sets SkipTests to true for the AI builder extension |
| eng/pipelines/release-ext-azure-coding-agent.yml | Sets SkipTests to true for the coding agent extension |
| eng/pipelines/release-ext-azure-ai-finetune.yml | Sets SkipTests to true for the AI finetune extension |
| eng/pipelines/release-ext-azure-ai-agents.yml | Sets SkipTests to true for the AI agents extension |
| cli/azd/extensions/microsoft.azd.demo/ci-test.ps1 | Creates template test script for the demo extension |
Comments suppressed due to low confidence (2)
eng/pipelines/templates/stages/release-azd-extension.yml:16
- The SkipTests parameter is defined but never passed down to the nested template. The parameter should be passed to the build-and-test-azd-extension.yml template so it can be used in the build job. Without this, all extensions will run tests regardless of the SkipTests setting.
- template: /eng/pipelines/templates/stages/build-and-test-azd-extension.yml
parameters:
AzdExtensionId: ${{ parameters.AzdExtensionId }}
AzdExtensionDirectory: ${{ parameters.AzdExtensionDirectory }}
eng/pipelines/templates/jobs/build-azd-extension.yml:77
- The PublishTestResults task will execute even when tests are skipped or when no tests exist. Consider adding a condition that checks if the test results file exists before attempting to publish, or condition it on whether tests were actually run.
- task: PublishTestResults@2
inputs:
testResultsFormat: JUnit
testResultsFiles: "**/junitTestReport.xml"
testRunTitle: $(Agent.JobName)
searchFolder: ${{ parameters.AzdExtensionDirectory }}
publishRunAttachments: true
displayName: Publish test results
condition: succeededOrFailed()
No description provided.