-
Notifications
You must be signed in to change notification settings - Fork 681
Optimize CI: Split into separate workflows with native path filtering #259
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: friggeri <106686+friggeri@users.noreply.github.com>
Co-authored-by: friggeri <106686+friggeri@users.noreply.github.com>
Co-authored-by: friggeri <106686+friggeri@users.noreply.github.com>
…flow files to filters Co-authored-by: friggeri <106686+friggeri@users.noreply.github.com>
Co-authored-by: friggeri <106686+friggeri@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 optimizes the CI workflow by removing redundant triggers and adding path-based filtering to run SDK tests only when relevant files change. The changes reduce unnecessary test runs while ensuring comprehensive coverage through pull requests and merge groups.
Changes:
- Removed push trigger for main branch (redundant with PR and merge group coverage)
- Added path-based filtering using dorny/paths-filter@v3 to detect which SDKs have changed files
- Fixed missing outputs declaration in setup-copilot composite action and updated all references
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| .github/workflows/sdk-e2e-tests.yml | Removed push trigger, added changes detection job with path filters for each SDK, added conditional execution to all SDK test jobs with bypass for workflow_dispatch and merge_group events, updated COPILOT_CLI_PATH references |
| .github/actions/setup-copilot/action.yml | Added missing outputs declaration for cli-path to fix composite action usage |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
.github/workflows/sdk-e2e-tests.yml
Outdated
| steps: | ||
| - uses: actions/checkout@v6.0.2 | ||
| - uses: ./.github/actions/setup-copilot | ||
| id: setup-copilot |
Copilot
AI
Jan 29, 2026
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.
The setup-copilot action is given an id here, but the corresponding COPILOT_CLI_PATH environment variable is not set in the .NET SDK test step (line 266-269). This is inconsistent with the other SDK tests (Node.js at line 100, Go at line 156, Python at line 209) which all use the setup-copilot outputs. The .NET SDK tests do use COPILOT_CLI_PATH (see dotnet/test/ClientTests.cs and dotnet/test/Harness/E2ETestContext.cs), so this environment variable should be added to the test step's env section.
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.
seems like the dotnet tests don't need it for some reason? they didn't have it before
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.
Fixed in 2703e85. The .NET SDK workflow now includes COPILOT_CLI_PATH in the test step's environment variables, consistent with the other SDK tests.
|
@copilot split that into one workflow per sdk and use the native github actions path filtering |
Co-authored-by: friggeri <106686+friggeri@users.noreply.github.com>
Done in 2703e85. Split into 4 separate workflows (nodejs-sdk-tests.yml, go-sdk-tests.yml, python-sdk-tests.yml, dotnet-sdk-tests.yml) using native GitHub Actions |
CI runs all SDK tests on every trigger, wasting resources. This splits the monolithic workflow into separate per-SDK workflows using native GitHub Actions path filtering so tests only run when relevant files change.
Changes
nodejs-sdk-tests.yml- Node.js SDK testsgo-sdk-tests.yml- Go SDK testspython-sdk-tests.yml- Python SDK testsdotnet-sdk-tests.yml- .NET SDK testson.pull_request.pathsto filter when it runs:nodejs/**,test/**, workflow filestest/**,nodejs/package.json(CLI dependency), workflow filesoutputsdeclaration tosetup-copilotaction (pre-existing bug)COPILOT_CLI_PATHenvironment variable to .NET test stepExample
All workflows run unconditionally on
workflow_dispatchandmerge_group.Original prompt
💡 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.