Skip to content

Conversation

@Harmanpreet-Microsoft
Copy link
Contributor

Purpose

This pull request updates several GitHub Actions workflow files to trigger jobs more selectively based on file path changes. The main goal is to improve CI/CD efficiency by ensuring workflows only run when relevant files are modified. The changes affect workflows for CodeQL analysis, deployment validation, Docker builds, linting, and testing.

Workflow trigger improvements:

  • Added paths filters to the push and pull_request triggers in .github/workflows/codeql.yml, so the CodeQL workflow only runs when relevant source code, tests, or the workflow file itself are changed.
  • Added paths filters to the push and pull_request triggers in .github/workflows/deploy.yml, restricting deployment validation to infrastructure and workflow file changes.
  • Added paths filters to the push and pull_request triggers in .github/workflows/docker-build-and-push.yml, so Docker builds only run when backend, frontend, server, or the workflow file changes. [1] [2]
  • Added paths filters to the push and pull_request triggers in .github/workflows/pylint.yml, so linting runs only when backend Python files, requirements, or relevant config/workflow files change.
  • Added paths filters to the push and pull_request triggers in .github/workflows/test.yml, so tests only run when backend, server, test files, or relevant config/workflow files are modified.

These changes help reduce unnecessary workflow runs, saving CI resources and speeding up feedback for relevant code changes.

  • ...

Does this introduce a breaking change?

  • Yes
  • No

How to Test

  • Get the code
git clone [repo-address]
cd [repo-name]
git checkout [branch-name]
npm install
  • Test the code

What to Check

Verify that the following are valid

  • ...

Other Information

…eployment, Docker build, PyLint, and testing processes
Copy link
Contributor

Copilot AI left a 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 enhances CI/CD efficiency by adding path filters to GitHub Actions workflows, ensuring they trigger only when relevant files are modified. The changes affect five workflow files: CodeQL analysis, deployment validation, Docker builds, Python linting, and testing.

Key Changes

  • Added path-based trigger filters to all major workflows (test, lint, Docker build, deploy, CodeQL)
  • Updated branch targeting to include v3 branches (dev-v3, demo-v3) for deployment and Docker workflows
  • Preserved existing trigger types (push, pull_request, workflow_run, schedule, workflow_dispatch)

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 17 comments.

Show a summary per file
File Description
.github/workflows/test.yml Added path filters to trigger tests only for Python files, test files, and test configuration changes in backend, tests, and mcp_server directories
.github/workflows/pylint.yml Added path filters to trigger linting only for backend Python files, requirements, and linting configuration
.github/workflows/docker-build-and-push.yml Added path filters to trigger Docker builds only for frontend, backend, mcp_server source code, and the workflow file itself
.github/workflows/deploy.yml Added push and pull_request triggers with path filters for infrastructure files (Bicep templates, parameters, scripts)
.github/workflows/codeql.yml Added path filters to trigger CodeQL analysis only for source code files (Python, JavaScript, TypeScript) and test files

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant