diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 14ce486fd..e67b49487 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -14,8 +14,22 @@ name: "CodeQL Advanced" on: push: branches: [ "main", "dev", "demo" ] + paths: + - 'src/**/*.py' + - 'src/**/*.js' + - 'src/**/*.ts' + - 'src/**/*.tsx' + - 'tests/**/*.py' + - '.github/workflows/codeql.yml' pull_request: branches: [ "main", "dev", "demo" ] + paths: + - 'src/**/*.py' + - 'src/**/*.js' + - 'src/**/*.ts' + - 'src/**/*.tsx' + - 'tests/**/*.py' + - '.github/workflows/codeql.yml' schedule: - cron: '44 20 * * 2' @@ -91,4 +105,4 @@ jobs: - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v3 with: - category: "/language:${{matrix.language}}" + category: "/language:${{matrix.language}}" \ No newline at end of file diff --git a/.github/workflows/docker-build-and-push.yml b/.github/workflows/docker-build-and-push.yml index eb46863e5..9f1ea0649 100644 --- a/.github/workflows/docker-build-and-push.yml +++ b/.github/workflows/docker-build-and-push.yml @@ -7,6 +7,18 @@ on: - dev-v3 - demo-v3 - hotfix + paths: + - 'src/frontend/**' + - 'src/backend/**' + - 'src/mcp_server/**' + - '.github/workflows/docker-build-and-push.yml' + - 'infra/main.bicep' + - 'infra/modules/**/*.bicep' + - 'infra/*.parameters.json' + - 'infra/scripts/**' + - '.github/workflows/deploy.yml' + - 'azure.yaml' + - 'azure_custom.yaml' pull_request: types: - opened @@ -18,6 +30,18 @@ on: - dev-v3 - demo-v3 - hotfix + paths: + - 'src/frontend/**' + - 'src/backend/**' + - 'src/mcp_server/**' + - '.github/workflows/docker-build-and-push.yml' + - 'infra/main.bicep' + - 'infra/modules/**/*.bicep' + - 'infra/*.parameters.json' + - 'infra/scripts/**' + - '.github/workflows/deploy.yml' + - 'azure.yaml' + - 'azure_custom.yaml' workflow_dispatch: jobs: diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml index bc2851159..a18c0c306 100644 --- a/.github/workflows/pylint.yml +++ b/.github/workflows/pylint.yml @@ -1,6 +1,14 @@ name: PyLint -on: [push] +on: + push: + paths: + - 'src/backend/**/*.py' + - 'src/mcp_server/**/*.py' + - 'src/backend/requirements.txt' + - '.flake8' + - '.github/workflows/pylint.yml' + jobs: build: @@ -24,4 +32,4 @@ jobs: - name: Run flake8 and pylint run: | - flake8 --config=.flake8 src/backend # Specify the directory to lint + flake8 --config=.flake8 src/backend \ No newline at end of file diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7d8ca7c0b..8709c28b7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -7,6 +7,15 @@ on: - dev - demo - hotfix + paths: + - 'src/backend/**/*.py' + - 'src/tests/**/*.py' + - 'src/mcp_server/**/*.py' + - 'src/**/pyproject.toml' + - 'pytest.ini' + - 'conftest.py' + - 'src/backend/requirements.txt' + - '.github/workflows/test.yml' pull_request: types: - opened @@ -14,11 +23,19 @@ on: - reopened - synchronize branches: - - main - main - dev - demo - hotfix + paths: + - 'src/backend/**/*.py' + - 'src/tests/**/*.py' + - 'src/mcp_server/**/*.py' + - 'pytest.ini' + - 'conftest.py' + - 'src/backend/requirements.txt' + - 'src/**/pyproject.toml' + - '.github/workflows/test.yml' jobs: test: @@ -73,4 +90,4 @@ jobs: - name: Skip coverage report if no tests if: env.skip_tests == 'true' run: | - echo "Skipping coverage report because no tests were found." + echo "Skipping coverage report because no tests were found." \ No newline at end of file