-
Notifications
You must be signed in to change notification settings - Fork 421
ci: add path-based triggers to all workflows and document workflow structure #699
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
base: main
Are you sure you want to change the base?
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 PR adds path-based triggers to five GitHub Actions workflows to optimize CI/CD performance and introduces comprehensive documentation explaining all workflows in the repository.
Key Changes:
- Added path filters to
codeql.yml,deploy.yml,docker-build-and-push.yml,pylint.yml, andtest.ymlto ensure workflows only run when relevant files are modified - Created
docs/GitHubActionsWorkflows.mdwith detailed documentation of all workflows, their triggers, purposes, and path filters - Path filters are precisely scoped to files actually used by each workflow (e.g., PyLint only monitors backend Python files, Docker builds only monitor source directories)
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
.github/workflows/codeql.yml |
Added path filters to trigger only on source code files (Python, JS, TS, TSX) and test files |
.github/workflows/deploy.yml |
Added path filters to trigger only on infrastructure files (Bicep templates, parameters, scripts) |
.github/workflows/docker-build-and-push.yml |
Added path filters to trigger only on source directories (frontend, backend, MCP server) |
.github/workflows/pylint.yml |
Added path filters to trigger only on backend Python files, requirements, and Flake8 config |
.github/workflows/test.yml |
Added path filters to trigger only on backend/MCP/test Python files and relevant configs |
docs/GitHubActionsWorkflows.md |
New comprehensive documentation covering all workflows, triggers, path filters, and optimization benefits |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| **Path Filters** - Only runs when these files change: | ||
| ```yaml | ||
| - 'src/**/*.py' # All Python source files | ||
| - 'tests/**' # All test files | ||
| - 'src/tests/**' # Source test files | ||
| - 'pytest.ini' # Pytest configuration | ||
| - 'conftest.py' # Pytest configuration | ||
| - 'requirements*.txt' # Any requirements files | ||
| - 'src/backend/requirements*.txt' # Backend requirements | ||
| - 'src/mcp_server/requirements*.txt' # MCP server requirements | ||
| - '.github/workflows/test-automation.yml' # This workflow file | ||
| ``` |
Copilot
AI
Dec 10, 2025
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 documentation lists path filters for the Test Automation workflow, but the actual test-automation.yml file does not have any path filters since it only has workflow_dispatch and workflow_call triggers (which don't support path filtering). This section should either be removed or updated to clarify that path filtering is not applicable for this workflow.
| **Path Filters** - Only runs when these files change: | |
| ```yaml | |
| - 'src/**/*.py' # All Python source files | |
| - 'tests/**' # All test files | |
| - 'src/tests/**' # Source test files | |
| - 'pytest.ini' # Pytest configuration | |
| - 'conftest.py' # Pytest configuration | |
| - 'requirements*.txt' # Any requirements files | |
| - 'src/backend/requirements*.txt' # Backend requirements | |
| - 'src/mcp_server/requirements*.txt' # MCP server requirements | |
| - '.github/workflows/test-automation.yml' # This workflow file | |
| ``` | |
| **Path Filters**: | |
| _Note: Path filtering is not applicable for this workflow, since it only uses manual (`workflow_dispatch`) and called (`workflow_call`) triggers, which do not support path filters._ |
| | **PyLint** | Push/PR + Paths | Python code linting and quality checks (backend only) | `src/backend/` Python files, requirements.txt, .flake8 config | | ||
| | **CodeQL** | Push/PR + Paths + Schedule | Security and code quality analysis | Source code files only (Python, JS, TS, TSX), test Python files | | ||
| | **Test Workflow with Coverage** | Push/PR + Paths | Python unit tests with coverage reporting (backend-focused) | Backend, MCP, tests Python files, backend requirements | | ||
| | **Test Automation** | Push/PR + Paths + Manual | Run automated tests | Python files, test files, requirements | |
Copilot
AI
Dec 10, 2025
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 documentation states that the "Test Automation" workflow runs on "Push/PR + Paths + Manual", but the actual test-automation.yml workflow file only has workflow_dispatch and workflow_call triggers. It does not have push or pull_request triggers, nor does it have path filters. The table entry and detailed description should be updated to accurately reflect that this workflow only runs via manual trigger (workflow_dispatch) or when called by other workflows (workflow_call).
| | **Test Automation** | Push/PR + Paths + Manual | Run automated tests | Python files, test files, requirements | | |
| | **Test Automation** | Manual + Called by other workflows | Run automated tests | Python files, test files, requirements | |
| **When it runs**: | ||
| - **Push** to any branch | ||
| - **Pull Requests** to any branch | ||
| - **Manual trigger** (`workflow_dispatch`) | ||
| - **Called by other workflows** (`workflow_call`) |
Copilot
AI
Dec 10, 2025
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 documentation incorrectly states that the Test Automation workflow runs on "Push to any branch" and "Pull Requests to any branch". The actual test-automation.yml workflow file only has workflow_dispatch (manual trigger) and workflow_call (called by other workflows) triggers. It does not run on push or pull_request events. This section should be updated to accurately reflect the actual triggers.
Purpose
This pull request introduces comprehensive improvements to the repository's GitHub Actions workflows by adding precise path-based triggers to all workflow YAML files. This ensures that workflows only run when relevant files are changed, optimizing CI/CD performance and providing faster, more targeted feedback. Additionally, a new documentation file has been added to clearly explain the workflows, their triggers, and the benefits of these optimizations.
Workflow trigger optimizations:
pathsfilters to the following workflow files to ensure jobs only run when relevant files are modified:.github/workflows/codeql.yml: Now triggers only on changes to source code files (Python, JS, TS, TSX), test Python files, or the workflow file itself..github/workflows/deploy.yml: Now triggers only on changes to infrastructure files (Bicep templates, parameters, scripts) or the workflow file itself..github/workflows/docker-build-and-push.yml: Now triggers only on changes to frontend, backend, MCP server source directories, or the workflow file itself. [1] [2].github/workflows/pylint.yml: Now triggers only on changes to backend Python files, requirements, Flake8 config, or the workflow file itself..github/workflows/test.yml: Now triggers only on changes to backend, MCP server, and test Python files, relevant config/requirements, or the workflow file itself.Documentation:
docs/GitHubActionsWorkflows.md, a thorough guide that documents all workflows, their triggers, purposes, path filters, and the benefits of these optimizations for the development process.These changes collectively improve CI/CD efficiency by reducing unnecessary workflow runs, providing clearer PR status, and making the workflow system easier to maintain and understand.* ...
Does this introduce a breaking change?
How to Test
What to Check
Verify that the following are valid
Other Information