-
Notifications
You must be signed in to change notification settings - Fork 53
Add Azure Functions smoke tests with Docker CI automation #545
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
|
@copilot we should use project reference for testing code used in this repo instead of external published packages test/AzureFunctionsSmokeTests/AzureFunctionsSmokeTests.csproj. update to use project ref properly for all pacakges isolated dotnet function depends on in this repo to this csproj file |
Updated in commit 5cda258. The smoke test now uses project references for all Microsoft.DurableTask packages built by this repo:
Azure Functions packages (Microsoft.Azure.Functions.Worker.*) remain as PackageReferences since they're external to this repo. |
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 implements automated smoke testing for Azure Functions with Durable Task to catch SDK and source generator regressions. The implementation includes a .NET 8.0 isolated worker test application with the HelloCities orchestration pattern, Docker-based infrastructure for running tests locally and in CI, and GitHub Actions workflow integration.
Key changes:
- New smoke test Azure Functions application that references local project code instead of published NuGet packages
- PowerShell automation script that orchestrates Docker containers (Azurite + Functions host) and validates end-to-end orchestration workflows
- CI/CD integration via GitHub Actions workflow triggered on pushes and PRs to main and feature branches
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| test/AzureFunctionsSmokeTests/AzureFunctionsSmokeTests.csproj | Project file with local project references to all DurableTask packages and external Azure Functions dependencies |
| test/AzureFunctionsSmokeTests/HelloCitiesOrchestration.cs | Sample orchestration implementation with HTTP trigger, orchestrator, and activity functions |
| test/AzureFunctionsSmokeTests/Program.cs | Azure Functions host entry point |
| test/AzureFunctionsSmokeTests/Dockerfile | Container configuration for Functions app using .NET 8.0 isolated base image |
| test/AzureFunctionsSmokeTests/run-smoketests.ps1 | PowerShell automation script handling build, Docker orchestration, test execution, and cleanup |
| test/AzureFunctionsSmokeTests/host.json | Azure Functions host configuration with logging and Durable Task hub settings |
| test/AzureFunctionsSmokeTests/local.settings.json | Local development settings for the Functions app |
| test/AzureFunctionsSmokeTests/README.md | Documentation for running smoke tests locally and in CI |
| Directory.Packages.props | Added version entries for Azure Functions Worker HTTP extensions and SDK |
| .github/workflows/azure-functions-smoke-tests.yml | GitHub Actions workflow for automated smoke test execution |
|
@copilot update pr description to follow .github/PULL_REQUEST_TEMPLATE.md |
Here's the PR description formatted according to the template: SummaryWhat changed?
Why is this change needed?To provide automated regression testing for SDK and source generator updates in Azure Functions isolated .NET worker scenarios. This enables catching breaking changes before they are released and ensures the SDK works correctly with Azure Functions. Issues / work itemsProject checklist
AI-assisted code disclosure (required)Was an AI tool used? (select one)
If AI was used:
AI verification (required if AI was used):
TestingAutomated tests
Manual validation
Notes for reviewersImplementation DetailsTest Application (
Docker Orchestration (
CI Integration (
Key ConfigurationSets Package UpdatesAdded missing versions to
Project ReferencesUses project references for all Microsoft.DurableTask packages to validate code in this repository instead of published NuGet packages. |
|
@copilot update Microsoft.Azure.Functions.Worker.Extensions.Http to 3.3.0 and |
Updated in commit e9beed5. Package versions in Directory.Packages.props:
Build and restore verified successfully. |
Co-authored-by: YunchuWang <[email protected]>
Co-authored-by: YunchuWang <[email protected]>
…ility Co-authored-by: YunchuWang <[email protected]>
Replace transitive NuGet package dependencies with direct project references to: - Microsoft.DurableTask.Abstractions - Microsoft.DurableTask.Client - Microsoft.DurableTask.Client.Grpc - Microsoft.DurableTask.Worker - Microsoft.DurableTask.Worker.Grpc - Microsoft.DurableTask.Grpc - Microsoft.DurableTask.Analyzers This ensures the smoke tests validate code from this repo rather than published packages. Co-authored-by: YunchuWang <[email protected]>
Updated package versions in Directory.Packages.props: - Microsoft.Azure.Functions.Worker.Extensions.Http: 3.0.13 -> 3.3.0 - Microsoft.Azure.Functions.Worker.Sdk: 1.16.2 -> 2.0.7 Co-authored-by: YunchuWang <[email protected]>
e9beed5 to
d46fd5b
Compare
Summary
What changed?
test/AzureFunctionsSmokeTests/) with HelloCities orchestration patternrun-smoketests.ps1) for local and CI testing.github/workflows/azure-functions-smoke-tests.yml) for automated CI testingDirectory.Packages.propsWhy is this change needed?
To provide automated regression testing for SDK and source generator updates in Azure Functions isolated .NET worker scenarios. This enables catching breaking changes before they are released and ensures the SDK works correctly with Azure Functions.
Issues / work items
Project checklist
AI-assisted code disclosure (required)
Was an AI tool used? (select one)
If AI was used:
test/AzureFunctionsSmokeTests/.github/workflows/azure-functions-smoke-tests.ymlDirectory.Packages.propsAI verification (required if AI was used):
Testing
Automated tests
Manual validation
Notes for reviewers
Implementation Details
Test Application (
test/AzureFunctionsSmokeTests/)Docker Orchestration (
run-smoketests.ps1)CI Integration (
.github/workflows/azure-functions-smoke-tests.yml)Key Configuration
Sets
WEBSITE_HOSTNAMEenvironment variable to enable webhook generation in isolated worker:Azurite connection string components broken out for maintainability. Error polling includes consecutive failure limit to prevent infinite loops on persistent issues.
Package Updates
Added/updated versions in
Directory.Packages.props:Microsoft.Azure.Functions.Worker.Extensions.Http(3.3.0)Microsoft.Azure.Functions.Worker.Sdk(2.0.7)Project References
The smoke test uses project references for all Microsoft.DurableTask packages to validate code in this repository:
Microsoft.DurableTask.AbstractionsMicrosoft.DurableTask.Client(Core + Grpc)Microsoft.DurableTask.Worker(Core + Grpc)Microsoft.DurableTask.GrpcMicrosoft.DurableTask.AnalyzersMicrosoft.DurableTask.GeneratorsExternal Azure Functions packages remain as PackageReferences since they're not built in this repo.
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.