Skip to content

Commit f439439

Browse files
Merge branch 'main' into demo
2 parents f46dc3a + c787e63 commit f439439

24 files changed

Lines changed: 6773 additions & 1433 deletions

.github/workflows/deploy-linux.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,16 @@ on:
33
pull_request:
44
branches:
55
- main
6+
paths:
7+
- 'src/frontend/**'
8+
- 'src/**/*.py'
9+
- 'src/requirements*.txt'
10+
- 'src/WebApp.Dockerfile'
11+
- '!src/tests/**'
12+
- 'infra/**/*.bicep'
13+
- 'infra/**/*.json'
14+
- '*.yaml'
15+
- '.github/workflows/deploy-*.yml'
616
workflow_run:
717
workflows: ["Build Docker and Optional Push"]
818
types:

.github/workflows/deploy-orchestrator.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ jobs:
7474
secrets: inherit
7575

7676
deploy:
77-
if: always() && (inputs.trigger_type != 'workflow_dispatch' || inputs.existing_webapp_url == '' || inputs.existing_webapp_url == null)
77+
if: "!cancelled() && (inputs.trigger_type != 'workflow_dispatch' || inputs.existing_webapp_url == '' || inputs.existing_webapp_url == null)"
7878
needs: docker-build
7979
uses: ./.github/workflows/job-deploy.yml
8080
with:
@@ -94,7 +94,7 @@ jobs:
9494
secrets: inherit
9595

9696
e2e-test:
97-
if: always() && ((needs.deploy.result == 'success' && needs.deploy.outputs.WEB_APPURL != '') || (inputs.existing_webapp_url != '' && inputs.existing_webapp_url != null)) && (inputs.trigger_type != 'workflow_dispatch' || (inputs.run_e2e_tests != 'None' && inputs.run_e2e_tests != '' && inputs.run_e2e_tests != null))
97+
if: "!cancelled() && ((needs.deploy.result == 'success' && needs.deploy.outputs.WEB_APPURL != '') || (inputs.existing_webapp_url != '' && inputs.existing_webapp_url != null)) && (inputs.trigger_type != 'workflow_dispatch' || (inputs.run_e2e_tests != 'None' && inputs.run_e2e_tests != '' && inputs.run_e2e_tests != null))"
9898
needs: [docker-build, deploy]
9999
uses: ./.github/workflows/test-automation-v2.yml
100100
with:
@@ -103,7 +103,7 @@ jobs:
103103
secrets: inherit
104104

105105
send-notification:
106-
if: always()
106+
if: "!cancelled()"
107107
needs: [docker-build, deploy, e2e-test]
108108
uses: ./.github/workflows/job-send-notification.yml
109109
with:
@@ -122,7 +122,7 @@ jobs:
122122
secrets: inherit
123123

124124
cleanup-deployment:
125-
if: always() && needs.deploy.result == 'success' && needs.deploy.outputs.RESOURCE_GROUP_NAME != '' && inputs.existing_webapp_url == '' && (inputs.trigger_type != 'workflow_dispatch' || inputs.cleanup_resources)
125+
if: "!cancelled() && needs.deploy.outputs.RESOURCE_GROUP_NAME != '' && inputs.existing_webapp_url == '' && (inputs.trigger_type != 'workflow_dispatch' || inputs.cleanup_resources)"
126126
needs: [docker-build, deploy, e2e-test]
127127
uses: ./.github/workflows/job-cleanup-deployment.yml
128128
with:

.github/workflows/deploy-v2.yml

Lines changed: 0 additions & 853 deletions
This file was deleted.

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

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,27 @@ name: Build Docker and Optional Push
33
on:
44
push:
55
branches: [main, dev, demo]
6+
paths:
7+
- 'src/frontend/**'
8+
- 'src/**/*.py'
9+
- 'src/requirements*.txt'
10+
- 'src/WebApp.Dockerfile'
11+
- '.github/workflows/docker-build-and-push.yml'
12+
- '!src/tests/**'
613
pull_request:
714
branches: [main, dev, demo]
815
types:
916
- opened
1017
- ready_for_review
1118
- reopened
1219
- synchronize
20+
paths:
21+
- 'src/frontend/**'
22+
- 'src/**/*.py'
23+
- 'src/requirements*.txt'
24+
- 'src/WebApp.Dockerfile'
25+
- '.github/workflows/docker-build-and-push.yml'
26+
- '!src/tests/**'
1327
merge_group:
1428
workflow_dispatch:
1529

.github/workflows/job-deploy.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ jobs:
202202
echo "RESOURCE_GROUP_NAME=${{ inputs.resource_group_name }}" >> $GITHUB_ENV
203203
else
204204
echo "Generating a unique resource group name..."
205-
ACCL_NAME="docgenv2" # Account name as specified
205+
ACCL_NAME="docgen" # Account name as specified
206206
SHORT_UUID=$(uuidgen | cut -d'-' -f1)
207207
UNIQUE_RG_NAME="arg-${ACCL_NAME}-${SHORT_UUID}"
208208
echo "RESOURCE_GROUP_NAME=${UNIQUE_RG_NAME}" >> $GITHUB_ENV
@@ -298,9 +298,7 @@ jobs:
298298
echo "" >> $GITHUB_STEP_SUMMARY
299299
echo "| Configuration | Value |" >> $GITHUB_STEP_SUMMARY
300300
echo "|---------------|-------|" >> $GITHUB_STEP_SUMMARY
301-
echo "| **Trigger Type** | \`${{ github.event_name }}\` |" >> $GITHUB_STEP_SUMMARY
302301
echo "| **Branch** | \`${{ env.BRANCH_NAME }}\` |" >> $GITHUB_STEP_SUMMARY
303-
echo "| **Runner OS** | \`${{ inputs.runner_os }}\` |" >> $GITHUB_STEP_SUMMARY
304302
echo "| **WAF Enabled** | ${{ env.WAF_ENABLED == 'true' && '✅ Yes' || '❌ No' }} |" >> $GITHUB_STEP_SUMMARY
305303
echo "| **EXP Enabled** | ${{ env.EXP == 'true' && '✅ Yes' || '❌ No' }} |" >> $GITHUB_STEP_SUMMARY
306304
echo "| **Run E2E Tests** | \`${{ env.RUN_E2E_TESTS }}\` |" >> $GITHUB_STEP_SUMMARY
@@ -328,7 +326,7 @@ jobs:
328326
deploy-linux:
329327
name: Deploy on Linux
330328
needs: azure-setup
331-
if: inputs.runner_os == 'ubuntu-latest' && always() && needs.azure-setup.result == 'success'
329+
if: inputs.runner_os == 'ubuntu-latest' && !cancelled() && needs.azure-setup.result == 'success'
332330
uses: ./.github/workflows/job-deploy-linux.yml
333331
with:
334332
ENV_NAME: ${{ needs.azure-setup.outputs.ENV_NAME }}
@@ -346,7 +344,7 @@ jobs:
346344
deploy-windows:
347345
name: Deploy on Windows
348346
needs: azure-setup
349-
if: inputs.runner_os == 'windows-latest' && always() && needs.azure-setup.result == 'success'
347+
if: inputs.runner_os == 'windows-latest' && !cancelled() && needs.azure-setup.result == 'success'
350348
uses: ./.github/workflows/job-deploy-windows.yml
351349
with:
352350
ENV_NAME: ${{ needs.azure-setup.outputs.ENV_NAME }}

.github/workflows/job-send-notification.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -192,8 +192,8 @@ jobs:
192192
193193
EMAIL_BODY=$(cat <<EOF
194194
{
195-
"body": "<p>Dear Team,</p><p>The ${{ env.accelerator_name }} pipeline executed against the <strong>existing WebApp URL</strong> and testing process has completed successfully.</p><p><strong>Test Results:</strong><br>• Status: ✅ Passed<br>• Test Suite: ${TEST_SUITE_NAME}<br>${TEST_REPORT_URL:+• Test Report: <a href='${TEST_REPORT_URL}'>View Report</a>}<br>• Target URL: <a href='${EXISTING_URL}'>${EXISTING_URL}</a></p><p><strong>Deployment:</strong> Skipped</p><p><strong>Run URL:</strong> <a href='${RUN_URL}'>${RUN_URL}</a></p><p>Best regards,<br>Your Automation Team</p>",
196-
"subject": "${{ env.accelerator_name }} Pipeline - Test Automation Passed (Existing URL)"
195+
"body": "<p>Dear Team,</p><p>The ${{ env.accelerator_name }} pipeline executed against the <strong>specified Target URL</strong> and testing process has completed successfully.</p><p><strong>Test Results:</strong><br>• Status: ✅ Passed<br>• Test Suite: ${TEST_SUITE_NAME}<br>${TEST_REPORT_URL:+• Test Report: <a href='${TEST_REPORT_URL}'>View Report</a>}<br>• Target URL: <a href='${EXISTING_URL}'>${EXISTING_URL}</a></p><p><strong>Deployment:</strong> Skipped</p><p><strong>Run URL:</strong> <a href='${RUN_URL}'>${RUN_URL}</a></p><p>Best regards,<br>Your Automation Team</p>",
196+
"subject": "${{ env.accelerator_name }} Pipeline - Test Automation Passed"
197197
}
198198
EOF
199199
)
@@ -213,8 +213,8 @@ jobs:
213213
214214
EMAIL_BODY=$(cat <<EOF
215215
{
216-
"body": "<p>Dear Team,</p><p>The ${{ env.accelerator_name }} pipeline executed against the <strong>existing WebApp URL</strong> and the test automation has encountered issues and failed to complete successfully.</p><p><strong>Failure Details:</strong><br>• Target URL: <a href='${EXISTING_URL}'>${EXISTING_URL}</a><br>${TEST_REPORT_URL:+• Test Report: <a href='${TEST_REPORT_URL}'>View Report</a>}<br>• Test Suite: ${TEST_SUITE_NAME}<br>• Deployment: Skipped</p><p><strong>Run URL:</strong> <a href='${RUN_URL}'>${RUN_URL}</a></p><p>Best regards,<br>Your Automation Team</p>",
217-
"subject": "${{ env.accelerator_name }} Pipeline - Test Automation Failed (Existing URL)"
216+
"body": "<p>Dear Team,</p><p>The ${{ env.accelerator_name }} pipeline executed against the <strong>specified Target URL</strong> and the test automation has encountered issues and failed to complete successfully.</p><p><strong>Failure Details:</strong><br>• Target URL: <a href='${EXISTING_URL}'>${EXISTING_URL}</a><br>${TEST_REPORT_URL:+• Test Report: <a href='${TEST_REPORT_URL}'>View Report</a>}<br>• Test Suite: ${TEST_SUITE_NAME}<br>• Deployment: Skipped</p><p><strong>Run URL:</strong> <a href='${RUN_URL}'>${RUN_URL}</a></p><p>Best regards,<br>Your Automation Team</p>",
217+
"subject": "${{ env.accelerator_name }} Pipeline - Test Automation Failed"
218218
}
219219
EOF
220220
)

.github/workflows/node.js.yml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,28 @@ name: Build Frontend
66
on:
77
push:
88
branches: [ "main" ]
9+
paths:
10+
- 'src/frontend/**/*.ts'
11+
- 'src/frontend/**/*.tsx'
12+
- 'src/frontend/**/*.js'
13+
- 'src/frontend/**/*.jsx'
14+
- 'src/frontend/**/*.json'
15+
- 'src/frontend/**/*.css'
16+
- 'src/frontend/**/*.scss'
17+
- 'src/frontend/**/*.html'
18+
- '.github/workflows/node.js.yml'
919
pull_request:
1020
branches: [ "main" ]
11-
21+
paths:
22+
- 'src/frontend/**/*.ts'
23+
- 'src/frontend/**/*.tsx'
24+
- 'src/frontend/**/*.js'
25+
- 'src/frontend/**/*.jsx'
26+
- 'src/frontend/**/*.json'
27+
- 'src/frontend/**/*.css'
28+
- 'src/frontend/**/*.scss'
29+
- 'src/frontend/**/*.html'
30+
- '.github/workflows/node.js.yml'
1231

1332
jobs:
1433
build:

.github/workflows/pylint.yml

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

3-
on: [push]
3+
on:
4+
push:
5+
paths:
6+
- 'src/**/*.py'
7+
- '.flake8'
8+
- '.github/workflows/pylint.yml'
49

510
jobs:
611
lint:

.github/workflows/python-app.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,18 @@ name: Python application
66
on:
77
push:
88
branches: [ "main" ]
9+
paths:
10+
- 'src/**/*.py'
11+
- 'src/requirements*.txt'
12+
- 'src/tests/**'
13+
- '.github/workflows/python-app.yml'
914
pull_request:
1015
branches: [ "main" ]
16+
paths:
17+
- 'src/**/*.py'
18+
- 'src/requirements*.txt'
19+
- 'src/tests/**'
20+
- '.github/workflows/python-app.yml'
1121

1222
permissions:
1323
contents: read

.github/workflows/test-automation-v2.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,9 @@ jobs:
9191
id: test1
9292
run: |
9393
if [ "${{ env.test_suite }}" == "GoldenPath-Testing" ]; then
94-
xvfb-run pytest --headed --html=report/report.html --self-contained-html
94+
xvfb-run pytest -m goldenpath --html=report/report.html --self-contained-html
95+
else
96+
xvfb-run pytest --html=report/report.html --self-contained-html
9597
fi
9698
working-directory: tests/e2e-test
9799
continue-on-error: true
@@ -106,7 +108,9 @@ jobs:
106108
if: ${{ steps.test1.outcome == 'failure' }}
107109
run: |
108110
if [ "${{ env.test_suite }}" == "GoldenPath-Testing" ]; then
109-
xvfb-run pytest --headed --html=report/report.html --self-contained-html
111+
xvfb-run pytest -m goldenpath --html=report/report.html --self-contained-html
112+
else
113+
xvfb-run pytest --html=report/report.html --self-contained-html
110114
fi
111115
working-directory: tests/e2e-test
112116
continue-on-error: true
@@ -121,7 +125,9 @@ jobs:
121125
if: ${{ steps.test2.outcome == 'failure' }}
122126
run: |
123127
if [ "${{ env.test_suite }}" == "GoldenPath-Testing" ]; then
124-
xvfb-run pytest --headed --html=report/report.html --self-contained-html
128+
xvfb-run pytest -m goldenpath --html=report/report.html --self-contained-html
129+
else
130+
xvfb-run pytest --html=report/report.html --self-contained-html
125131
fi
126132
working-directory: tests/e2e-test
127133

@@ -131,7 +137,9 @@ jobs:
131137
if: ${{ !cancelled() }}
132138
with:
133139
name: test-report
134-
path: tests/e2e-test/report/*
140+
path: |
141+
tests/e2e-test/report/*
142+
tests/e2e-test/screenshots/*
135143
136144
- name: Generate E2E Test Summary
137145
if: always()

0 commit comments

Comments
 (0)