Skip to content

Commit be90087

Browse files
Added Smoke Testing cases into Pipeline
1 parent 5c3e29b commit be90087

3 files changed

Lines changed: 18 additions & 10 deletions

File tree

.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.result == 'success' && 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/job-deploy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ jobs:
328328
deploy-linux:
329329
name: Deploy on Linux
330330
needs: azure-setup
331-
if: inputs.runner_os == 'ubuntu-latest' && always() && needs.azure-setup.result == 'success'
331+
if: inputs.runner_os == 'ubuntu-latest' && !cancelled() && needs.azure-setup.result == 'success'
332332
uses: ./.github/workflows/job-deploy-linux.yml
333333
with:
334334
ENV_NAME: ${{ needs.azure-setup.outputs.ENV_NAME }}
@@ -346,7 +346,7 @@ jobs:
346346
deploy-windows:
347347
name: Deploy on Windows
348348
needs: azure-setup
349-
if: inputs.runner_os == 'windows-latest' && always() && needs.azure-setup.result == 'success'
349+
if: inputs.runner_os == 'windows-latest' && !cancelled() && needs.azure-setup.result == 'success'
350350
uses: ./.github/workflows/job-deploy-windows.yml
351351
with:
352352
ENV_NAME: ${{ needs.azure-setup.outputs.ENV_NAME }}

.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)