Skip to content

Commit d212209

Browse files
author
Harmanpreet Kaur
committed
Enhance GitHub workflows by refining triggers and paths for CodeQL, deployment, Docker build, PyLint, and testing processes
1 parent ad55b11 commit d212209

5 files changed

Lines changed: 86 additions & 6 deletions

File tree

.github/workflows/codeql.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,22 @@ name: "CodeQL Advanced"
1414
on:
1515
push:
1616
branches: [ "main", "dev", "demo" ]
17+
paths:
18+
- 'src/**/*.py'
19+
- 'src/**/*.js'
20+
- 'src/**/*.ts'
21+
- 'src/**/*.tsx'
22+
- 'tests/**/*.py'
23+
- '.github/workflows/codeql.yml'
1724
pull_request:
1825
branches: [ "main", "dev", "demo" ]
26+
paths:
27+
- 'src/**/*.py'
28+
- 'src/**/*.js'
29+
- 'src/**/*.ts'
30+
- 'src/**/*.tsx'
31+
- 'tests/**/*.py'
32+
- '.github/workflows/codeql.yml'
1933
schedule:
2034
- cron: '44 20 * * 2'
2135

@@ -91,4 +105,4 @@ jobs:
91105
- name: Perform CodeQL Analysis
92106
uses: github/codeql-action/analyze@v3
93107
with:
94-
category: "/language:${{matrix.language}}"
108+
category: "/language:${{matrix.language}}"

.github/workflows/deploy.yml

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,33 @@
11
name: Validate Deployment v3
22

33
on:
4+
push:
5+
branches:
6+
- main
7+
- dev-v3
8+
- hotfix
9+
paths:
10+
- 'infra/main.bicep'
11+
- 'infra/modules/**/*.bicep'
12+
- 'infra/*.parameters.json'
13+
- 'infra/scripts/**'
14+
- '.github/workflows/deploy.yml'
15+
pull_request:
16+
types:
17+
- opened
18+
- ready_for_review
19+
- reopened
20+
- synchronize
21+
branches:
22+
- main
23+
- dev-v3
24+
- hotfix
25+
paths:
26+
- 'infra/main.bicep'
27+
- 'infra/modules/**/*.bicep'
28+
- 'infra/*.parameters.json'
29+
- 'infra/scripts/**'
30+
- '.github/workflows/deploy.yml'
431
workflow_run:
532
workflows: ["Build Docker and Optional Push v3"]
633
types:
@@ -385,4 +412,4 @@ jobs:
385412
if: always()
386413
run: |
387414
az logout
388-
echo "Logged out from Azure."
415+
echo "Logged out from Azure."

.github/workflows/docker-build-and-push.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ on:
77
- dev-v3
88
- demo-v3
99
- hotfix
10+
paths:
11+
- 'src/frontend/**'
12+
- 'src/backend/**'
13+
- 'src/mcp_server/**'
14+
- '.github/workflows/docker-build-and-push.yml'
1015
pull_request:
1116
types:
1217
- opened
@@ -18,6 +23,11 @@ on:
1823
- dev-v3
1924
- demo-v3
2025
- hotfix
26+
paths:
27+
- 'src/frontend/**'
28+
- 'src/backend/**'
29+
- 'src/mcp_server/**'
30+
- '.github/workflows/docker-build-and-push.yml'
2131
workflow_dispatch:
2232

2333
jobs:

.github/workflows/pylint.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
11
name: PyLint
22

3-
on: [push]
3+
on:
4+
push:
5+
paths:
6+
- 'src/backend/**/*.py'
7+
- 'src/backend/requirements.txt'
8+
- '.flake8'
9+
- '.github/workflows/pylint.yml'
10+
pull_request:
11+
paths:
12+
- 'src/backend/**/*.py'
13+
- 'src/backend/requirements.txt'
14+
- '.flake8'
15+
- '.github/workflows/pylint.yml'
416

517
jobs:
618
build:
@@ -24,4 +36,4 @@ jobs:
2436
2537
- name: Run flake8 and pylint
2638
run: |
27-
flake8 --config=.flake8 src/backend # Specify the directory to lint
39+
flake8 --config=.flake8 src/backend # Specify the directory to lint

.github/workflows/test.yml

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,35 @@ on:
77
- dev
88
- demo
99
- hotfix
10+
paths:
11+
- 'src/backend/**/*.py'
12+
- 'src/tests/**/*.py'
13+
- 'src/mcp_server/**/*.py'
14+
- 'pytest.ini'
15+
- 'conftest.py'
16+
- 'src/backend/requirements.txt'
17+
- 'pyproject.toml'
18+
- '.github/workflows/test.yml'
1019
pull_request:
1120
types:
1221
- opened
1322
- ready_for_review
1423
- reopened
1524
- synchronize
1625
branches:
17-
- main
1826
- main
1927
- dev
2028
- demo
2129
- hotfix
30+
paths:
31+
- 'src/backend/**/*.py'
32+
- 'src/tests/**/*.py'
33+
- 'src/mcp_server/**/*.py'
34+
- 'pytest.ini'
35+
- 'conftest.py'
36+
- 'src/backend/requirements.txt'
37+
- 'pyproject.toml'
38+
- '.github/workflows/test.yml'
2239

2340
jobs:
2441
test:
@@ -73,4 +90,4 @@ jobs:
7390
- name: Skip coverage report if no tests
7491
if: env.skip_tests == 'true'
7592
run: |
76-
echo "Skipping coverage report because no tests were found."
93+
echo "Skipping coverage report because no tests were found."

0 commit comments

Comments
 (0)