Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI: Research Assistant | Front end Unit test cases #91

Closed
wants to merge 297 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
297 commits
Select commit Hold shift + click to select a range
2ebdd4e
Merge branch 'main' of https://github.com/Prashant-Microsoft/PSL-BYOA…
Prashant-Microsoft Sep 25, 2024
a7ab4e2
testing research assistant automation flow
Prashant-Microsoft Sep 25, 2024
73a5394
testing automation flow
Prashant-Microsoft Sep 25, 2024
631c226
testing automation flow
Prashant-Microsoft Sep 25, 2024
12ea9af
testing research assistant automation flow
Prashant-Microsoft Sep 25, 2024
d592dbd
testing automation flow
Prashant-Microsoft Sep 25, 2024
edd8025
testing automation flow
Prashant-Microsoft Sep 25, 2024
14b6a42
testing automation flow
Prashant-Microsoft Sep 25, 2024
265e9a2
testing automation flow
Prashant-Microsoft Sep 25, 2024
60f7bcb
Update RAdeploy.yml
Roopan-Microsoft Sep 25, 2024
d8481ca
Merge pull request #1 from Roopan-Microsoft/patch-2
Prashant-Microsoft Sep 25, 2024
90e0d31
testing automation flow
Prashant-Microsoft Sep 25, 2024
d3af27f
testing automation flow
Prashant-Microsoft Sep 25, 2024
9eb6804
testing automation flow
Prashant-Microsoft Sep 25, 2024
cc7d7a4
testing automation flow
Prashant-Microsoft Sep 25, 2024
f35e908
testing automation flow
Prashant-Microsoft Sep 25, 2024
a4e9f3c
testing automation flow
Prashant-Microsoft Sep 25, 2024
857ee21
testing automation flow
Prashant-Microsoft Sep 25, 2024
7193a1e
testing automation flow
Prashant-Microsoft Sep 25, 2024
51ae9e0
testing automation flow
Prashant-Microsoft Sep 25, 2024
53651b3
client advisor automation
Prashant-Microsoft Sep 25, 2024
9aea348
research assistant automation
Prashant-Microsoft Sep 25, 2024
205aac6
client advisor automation
Prashant-Microsoft Sep 25, 2024
58ebd16
testing research assistant
Prashant-Microsoft Sep 25, 2024
697f482
testing client advisor
Prashant-Microsoft Sep 25, 2024
715c62b
testing automation flow
Prashant-Microsoft Sep 26, 2024
527a1be
testing automation flow
Prashant-Microsoft Sep 26, 2024
e043d60
removed conflict
Rohini-Microsoft Sep 26, 2024
63eacef
testing automation flow
Prashant-Microsoft Sep 26, 2024
4113fb4
testing automation flow
Prashant-Microsoft Sep 26, 2024
13781b6
testing automation flow
Prashant-Microsoft Sep 26, 2024
b6242cb
testing automation flow
Prashant-Microsoft Sep 26, 2024
2054d31
testing automation flow
Prashant-Microsoft Sep 26, 2024
59eb2df
testing automation flow
Prashant-Microsoft Sep 26, 2024
86cc456
testing automation flow
Prashant-Microsoft Sep 26, 2024
c3709bc
testing automation flow
Prashant-Microsoft Sep 26, 2024
84b8709
testing automation flow
Prashant-Microsoft Sep 26, 2024
29b5ac7
Test case for Home Page component
Sep 26, 2024
243783d
removed load_env
Rohini-Microsoft Sep 26, 2024
8f7c299
testing automation
Prashant-Microsoft Sep 26, 2024
ba8129c
testing automation flow
Prashant-Microsoft Sep 26, 2024
d383cb6
testing automation flow
Prashant-Microsoft Sep 26, 2024
ca9fd63
testing automation flow
Prashant-Microsoft Sep 26, 2024
ffa7e58
testing automation flow
Prashant-Microsoft Sep 26, 2024
61f087a
testing automation flow
Prashant-Microsoft Sep 26, 2024
c611354
testing automation flow
Prashant-Microsoft Sep 26, 2024
e6a12b9
testing automation flow
Prashant-Microsoft Sep 26, 2024
840f4d9
testing automation flow
Prashant-Microsoft Sep 26, 2024
0082562
testing automation flow
Prashant-Microsoft Sep 26, 2024
4333606
testing automation flow
Prashant-Microsoft Sep 27, 2024
53ed688
testing automation flow
Prashant-Microsoft Sep 27, 2024
1078e26
testing automation flow
Prashant-Microsoft Sep 27, 2024
e207931
testing automation flow
Prashant-Microsoft Sep 27, 2024
bd0299d
testing automation flow
Prashant-Microsoft Sep 27, 2024
93f67e1
testing automation flow
Prashant-Microsoft Sep 27, 2024
0e96c3b
testing automation flow
Prashant-Microsoft Sep 27, 2024
8248139
testing automation flow
Prashant-Microsoft Sep 27, 2024
b11f6b5
testing automation flow
Prashant-Microsoft Sep 27, 2024
45604fb
Unit Test Cases Changes
Bangarraju-Microsoft Sep 27, 2024
ff60a7c
testing automation flow
Prashant-Microsoft Sep 27, 2024
c2ee034
testing client advisor automation
Prashant-Microsoft Sep 27, 2024
e9bbcb8
testing automation flow
Prashant-Microsoft Sep 27, 2024
8df8a22
testing automation flow
Prashant-Microsoft Sep 27, 2024
03c7b8f
testing automation flow
Prashant-Microsoft Sep 27, 2024
d442ae2
testing automation flow
Prashant-Microsoft Sep 30, 2024
fa95596
testing automation flow
Prashant-Microsoft Sep 30, 2024
6ce5a74
testing automation flow
Prashant-Microsoft Sep 30, 2024
bee780e
testing automation flow
Prashant-Microsoft Sep 30, 2024
27d3011
testing automation flow
Prashant-Microsoft Sep 30, 2024
e619de9
testing automation flow
Prashant-Microsoft Sep 30, 2024
f659bdc
testing automation flow
Prashant-Microsoft Sep 30, 2024
a78ea5f
testing automation flow
Prashant-Microsoft Sep 30, 2024
358fb99
testing automation flow
Prashant-Microsoft Sep 30, 2024
e4142c7
testing automation flow
Prashant-Microsoft Sep 30, 2024
dfd7857
testing automation flow
Prashant-Microsoft Sep 30, 2024
c7d9e8d
testing automation flow
Prashant-Microsoft Sep 30, 2024
001374a
testing automation flow
Prashant-Microsoft Sep 30, 2024
8a3488c
testing automation flow
Prashant-Microsoft Sep 30, 2024
7c35bcb
testing automation flow
Prashant-Microsoft Sep 30, 2024
54227a9
testing automation flow
Prashant-Microsoft Sep 30, 2024
b9f954f
testing automation flow
Prashant-Microsoft Sep 30, 2024
7d1aefd
testing automation flow
Prashant-Microsoft Sep 30, 2024
afea4c7
testing automation flow
Prashant-Microsoft Sep 30, 2024
5f5246a
testing automation flow
Prashant-Microsoft Sep 30, 2024
6313a92
testing automation flow
Prashant-Microsoft Sep 30, 2024
77c3c03
testing automation flow
Prashant-Microsoft Sep 30, 2024
7b4043e
testing automation flow
Prashant-Microsoft Sep 30, 2024
64a2d62
testing automation flow
Prashant-Microsoft Sep 30, 2024
2bad73d
testing automation flow
Prashant-Microsoft Sep 30, 2024
6f9e2a9
testing automation flow
Prashant-Microsoft Sep 30, 2024
e86b075
testing automation flow
Prashant-Microsoft Sep 30, 2024
37fec17
testing automation flow
Prashant-Microsoft Sep 30, 2024
f760a1a
testing automation flow
Prashant-Microsoft Sep 30, 2024
4e94ced
testing automation flow
Prashant-Microsoft Sep 30, 2024
4d54e0a
testing automation flow
Prashant-Microsoft Sep 30, 2024
d54e7ae
testing automation flow
Prashant-Microsoft Sep 30, 2024
737e300
testing automation flow
Prashant-Microsoft Sep 30, 2024
7f106a5
testing automation flow
Prashant-Microsoft Sep 30, 2024
3446f98
testing automation flow
Prashant-Microsoft Sep 30, 2024
473d1a4
testing automation flow
Prashant-Microsoft Sep 30, 2024
5e653f3
testing automation flow
Prashant-Microsoft Sep 30, 2024
2595464
testing automation flow
Prashant-Microsoft Sep 30, 2024
416d349
testing automation flow
Prashant-Microsoft Sep 30, 2024
928d5e7
Update main.bicep
Roopan-Microsoft Sep 30, 2024
2b03a19
testing automation flow
Prashant-Microsoft Oct 1, 2024
0760386
testing automation flow
Prashant-Microsoft Oct 1, 2024
06cefcb
testing automation flow
Prashant-Microsoft Oct 1, 2024
5dd6ad7
testing automation flow
Prashant-Microsoft Oct 1, 2024
064bcf7
testing automation flow
Prashant-Microsoft Oct 1, 2024
d9963d4
Layout test
Oct 1, 2024
bd411f7
Merge pull request #2 from microsoft/dev
Roopan-Microsoft Oct 2, 2024
12dd649
testing automation flow
Prashant-Microsoft Oct 4, 2024
3cad65b
testing automation flow
Prashant-Microsoft Oct 4, 2024
312c4e1
testing automation flow
Prashant-Microsoft Oct 4, 2024
fb1c4bb
testing automation flow
Prashant-Microsoft Oct 4, 2024
aac9f71
Summarization of each call transcripts
Oct 4, 2024
c4310f5
testing automation flow
Prashant-Microsoft Oct 4, 2024
4a3dae9
testing automation flow
Prashant-Microsoft Oct 4, 2024
a61b35f
[Unit Test Cases] #8526 ( Answer Component)
Bangarraju-Microsoft Oct 4, 2024
f2123be
testing automation flow
Prashant-Microsoft Oct 4, 2024
0fca10d
HomePage added
Oct 4, 2024
84ed78f
testing automation flow
Prashant-Microsoft Oct 4, 2024
a667690
Added GrantView test cases
Oct 4, 2024
7e0106c
testing automation flow
Prashant-Microsoft Oct 4, 2024
cf348b8
testing automation flow
Prashant-Microsoft Oct 4, 2024
0ac38e7
modify code
Prashant-Microsoft Oct 7, 2024
ad6c497
Merge branch 'main' into psl-byo-bug7977
Himanshi-Mirosoft Oct 7, 2024
ef77694
added accessibility changes
Rohini-Microsoft Oct 7, 2024
433da72
Create codeql.yml
Roopan-Microsoft Oct 7, 2024
16fd5bd
Create label.yml
Roopan-Microsoft Oct 7, 2024
8b0b22a
Bicep updated to point dev for client advisor
Roopan-Microsoft Oct 7, 2024
0ea3a9f
main json updated
Roopan-Microsoft Oct 7, 2024
8f9909a
Bicep updated
Roopan-Microsoft Oct 7, 2024
f188e8a
label yml removed
Roopan-Microsoft Oct 7, 2024
d6126ec
Create label.yml
Roopan-Microsoft Oct 7, 2024
94112e8
labeler moved
Roopan-Microsoft Oct 7, 2024
e60f18e
deleted labeler yml
Roopan-Microsoft Oct 7, 2024
dab0d43
Create pylint.yml
Roopan-Microsoft Oct 7, 2024
0cf1f6c
Create eslint.yml
Roopan-Microsoft Oct 7, 2024
17e8be1
Citation panel segregated
Kiran-Siluveru-Microsoft Oct 8, 2024
028c331
Answers list segregated from chat
Kiran-Siluveru-Microsoft Oct 8, 2024
b6ff8d7
updated citation panel view logic to chat
Kiran-Siluveru-Microsoft Oct 8, 2024
13a28bb
answer list to Chat message container updated
Kiran-Siluveru-Microsoft Oct 8, 2024
3a3ecc8
removed unused import
Kiran-Siluveru-Microsoft Oct 8, 2024
a59fa5a
Update function_app.py regarding the system message
Harmanpreet-Microsoft Oct 9, 2024
d2fa3df
added test workflow files
Oct 9, 2024
6512c54
updated the branch name
Oct 9, 2024
1973c20
removed unnecessory Line of code
Oct 9, 2024
efa95d3
Merge branch 'psl-byo-bug7977' of https://github.com/microsoft/Build-…
Oct 9, 2024
b82666e
testcases for sidebarview -notcomplete
Oct 9, 2024
ceb95ec
answer test files
Oct 9, 2024
420ba70
added the SidebarViewtest
Oct 9, 2024
cb02ff7
Merge pull request #7 from Roopan-Microsoft/PSL-BUG-8413
Roopan-Microsoft Oct 9, 2024
c035902
added chat component unit test cases
Kiran-Siluveru-Microsoft Oct 9, 2024
400ea6d
added new test cases for stop generating
Kiran-Siluveru-Microsoft Oct 10, 2024
d8bf812
Merge branch 'PSL-US-7770-UnitTest' of https://github.com/microsoft/B…
Kiran-Siluveru-Microsoft Oct 10, 2024
935946a
add test scenario updated code
Mohan-Microsoft Oct 10, 2024
d809af0
Added Card and DraftDocumentView test cases
Himanshi-Mirosoft Oct 10, 2024
5a4bebf
add nopage test file
Oct 10, 2024
2150a94
Merge branch 'PSL-US-7770-UnitTest' of https://github.com/microsoft/B…
Oct 10, 2024
d7c552a
chat component unit test cases above 80% achieved
Kiran-Siluveru-Microsoft Oct 10, 2024
bd53688
Merge branch 'PSL-US-7770-UnitTest' of https://github.com/microsoft/B…
Kiran-Siluveru-Microsoft Oct 10, 2024
fe316c7
excluded not required patterns
Kiran-Siluveru-Microsoft Oct 10, 2024
a3aa421
added test case of citation panel and chatMessageContainer
Rohini-Microsoft Oct 10, 2024
7db77e8
added test cases of chatMessageContainer
Rohini-Microsoft Oct 10, 2024
e5a8e87
added test cases for condition
Rohini-Microsoft Oct 10, 2024
61c1ef7
UI - Unit test cases for Chat Component
Bangarraju-Microsoft Oct 11, 2024
7c10aed
Update Unit Test Case for Layout with regarding resources
Somesh-Microsoft Oct 11, 2024
2be4e0b
Merge branch 'PSL-US-7771-UT' of https://github.com/microsoft/Build-y…
Somesh-Microsoft Oct 11, 2024
188b1e0
Merge branch 'PSL-US-7771-UT' of https://github.com/microsoft/Build-y…
Bangarraju-Microsoft Oct 11, 2024
ea9aa36
Merge branch 'PSL-US-7771-UT' of https://github.com/microsoft/Build-y…
Somesh-Microsoft Oct 11, 2024
37283f4
Summarize and client name was changing on golden ques fix
Oct 11, 2024
82cefcb
renamed the file
Bangarraju-Microsoft Oct 11, 2024
e385d63
deleted test files
Prashant-Microsoft Oct 11, 2024
ad57076
Merge branch 'main' of https://github.com/microsoft/Build-your-own-co…
Kiran-Siluveru-Microsoft Oct 11, 2024
6b57ef2
Merge branch 'PSL-US-7770-UnitTest' of https://github.com/microsoft/B…
Kiran-Siluveru-Microsoft Oct 11, 2024
5b0d24c
Summarization issue line of code reduced
Oct 11, 2024
554f485
without context rendering console.error fix
Kiran-Siluveru-Microsoft Oct 11, 2024
4152860
added expect
Somesh-Microsoft Oct 11, 2024
2b7cf69
Merge branch 'main' into PSL-BUG-7014
Roopan-Microsoft Oct 11, 2024
6507a18
Merge pull request #6 from Prashant-Microsoft/main
Roopan-Microsoft Oct 11, 2024
08de05a
removed eslint file
Prashant-Microsoft Oct 11, 2024
396af58
removed unnecessory code for debug
Oct 11, 2024
e1de154
Merge pull request #13 from Roopan-Microsoft/psl-dev-remove-eslint
Roopan-Microsoft Oct 11, 2024
59e6a98
Merge pull request #10 from Roopan-Microsoft/PSL_BUG_8401
Roopan-Microsoft Oct 11, 2024
c96c40b
Merge pull request #3 from microsoft/PSL-BUG-7014
Roopan-Microsoft Oct 11, 2024
b54f7d8
Add answer test file
Oct 11, 2024
a47fe81
Merge branch 'PSL-US-7770-UnitTest' of https://github.com/microsoft/B…
Oct 11, 2024
148a0b8
UI - Unit test cases added for helpers and code clean up
Bangarraju-Microsoft Oct 11, 2024
5097c9b
Merge branch 'PSL-US-7771-UT' of https://github.com/microsoft/Build-y…
Bangarraju-Microsoft Oct 11, 2024
e4a5a8f
edits in answer test file
Oct 11, 2024
92f12f0
removed commented code
Bangarraju-Microsoft Oct 11, 2024
3019a85
Merge branch 'main' into PSL-US-7771-UT
Bangarraju-Microsoft Oct 11, 2024
c5ed67f
remove pylist error
Somesh-Microsoft Oct 11, 2024
aebe840
updated test scenario for ChatHistoryListItemCell
Mohan-Microsoft Oct 11, 2024
0794540
update pipeline
Somesh-Microsoft Oct 11, 2024
ef4508d
test5 cases for DraftDocumentsView
Oct 11, 2024
b595549
update the error
Somesh-Microsoft Oct 11, 2024
93480b4
Merge branch 'PSL-US-7770-UnitTest' of https://github.com/microsoft/B…
Oct 11, 2024
05d1f9b
Merge branch 'main' into psl-byo-bug7977
Himanshi-Mirosoft Oct 11, 2024
bef4a98
Use managed identity for cosmos db connection
Oct 11, 2024
5b70861
update error
Somesh-Microsoft Oct 11, 2024
f3d9033
Merge branch 'PSL-US-7771-UT' of https://github.com/microsoft/Build-y…
Mohan-Microsoft Oct 11, 2024
a7b69b3
coverage is added to git ignore
Mohan-Microsoft Oct 11, 2024
52408d7
Fixed failing test cases while running final coverage report
Mohan-Microsoft Oct 11, 2024
25dd1e0
added coverage in package
Mohan-Microsoft Oct 11, 2024
30540ec
commented failing test cases
Kiran-Siluveru-Microsoft Oct 11, 2024
5f9272b
Update pylint.yml
Roopan-Microsoft Oct 11, 2024
3898d72
Merge pull request #14 from Roopan-Microsoft/PSL-BUG-8988
Somesh-Microsoft Oct 11, 2024
513c139
Revert "Psl bug 8988"
Somesh-Microsoft Oct 11, 2024
1d88ce2
Merge pull request #15 from Roopan-Microsoft/revert-14-PSL-BUG-8988
Roopan-Microsoft Oct 11, 2024
ac190f2
disableLocalAuth
Oct 11, 2024
e250fa3
Merge pull request #11 from Roopan-Microsoft/PSL-testWorkflow
Roopan-Microsoft Oct 11, 2024
6a7e258
Removed test scenario in Card component
Bangarraju-Microsoft Oct 11, 2024
b754886
Merge branch 'PSL-US-7771-UT' of https://github.com/microsoft/Build-y…
Bangarraju-Microsoft Oct 11, 2024
9146cab
UI - Unit test cases added for new changes in UserCard
Bangarraju-Microsoft Oct 11, 2024
64d9add
removed interface
Bangarraju-Microsoft Oct 11, 2024
4b46af4
Merge pull request #5 from microsoft/psl-byo-bug7977
Roopan-Microsoft Oct 13, 2024
d5ed8b1
Update function_app.py
Roopan-Microsoft Oct 14, 2024
3d13276
Update function_app.py
Roopan-Microsoft Oct 14, 2024
fa7245d
Merge branch 'main' into PSL-US-7771-UT
Bangarraju-Microsoft Oct 14, 2024
848a990
Update UserCard.test.tsx
Bangarraju-Microsoft Oct 14, 2024
179952f
Merge pull request #17 from Roopan-Microsoft/psl_8041
Roopan-Microsoft Oct 14, 2024
9027fe3
resolved errors
Rohini-Microsoft Oct 14, 2024
6070962
installed undici
Rohini-Microsoft Oct 14, 2024
5623f66
removed uncovered testcases files
Rohini-Microsoft Oct 14, 2024
01f377b
updated pylint workflow
AjitPadhi-Microsoft Oct 14, 2024
ab728c4
excluding draftdocumentview from coverage
Rohini-Microsoft Oct 14, 2024
acec2be
updated pylint workflow
AjitPadhi-Microsoft Oct 14, 2024
ca682ec
fixed lint issue
AjitPadhi-Microsoft Oct 14, 2024
a51e05b
fixed lint issue
AjitPadhi-Microsoft Oct 14, 2024
f76ca6a
Merge pull request #20 from Roopan-Microsoft/PSL-8988
Roopan-Microsoft Oct 14, 2024
7eb7cc0
Merge branch 'main' into PSL-US-8935
Roopan-Microsoft Oct 14, 2024
45ae3fa
Merge branch 'main' into PSL-US-7771-UT
Roopan-Microsoft Oct 14, 2024
95790bd
Merge pull request #16 from Roopan-Microsoft/PSL-US-8935
Roopan-Microsoft Oct 14, 2024
7bcbf36
revert the changes in client ad
Rohini-Microsoft Oct 14, 2024
f66c2dd
Merge pull request #18 from microsoft/PSL-US-7771-UT
Roopan-Microsoft Oct 14, 2024
0cc2a3d
revert changes
Rohini-Microsoft Oct 14, 2024
b61a600
revert change
Rohini-Microsoft Oct 14, 2024
54625c4
revert
Rohini-Microsoft Oct 14, 2024
c0cbc95
revert
Rohini-Microsoft Oct 14, 2024
e0ef892
revert
Rohini-Microsoft Oct 14, 2024
cb22176
revert
Rohini-Microsoft Oct 14, 2024
435a41a
Update app.py
Rohini-Microsoft Oct 14, 2024
ab4e974
Merge branch 'main' into PSL-US-7770-UnitTest
Rohini-Microsoft Oct 14, 2024
c774a1b
Update app.py
Rohini-Microsoft Oct 14, 2024
808d388
Update app.py
Rohini-Microsoft Oct 14, 2024
967e4c7
lint error
Rohini-Microsoft Oct 14, 2024
324b2f2
revert
Rohini-Microsoft Oct 14, 2024
2fc379e
lint error fixed
Rohini-Microsoft Oct 14, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
128 changes: 128 additions & 0 deletions .github/workflows/CAdeploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
name: CI-Validate Deployment-Client Advisor

on:
push:
branches:
- main
paths:
- 'ClientAdvisor/**'

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- name: Checkout Code
uses: actions/checkout@v3

- name: Setup Azure CLI
run: |
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
az --version # Verify installation

- name: Login to Azure
run: |
az login --service-principal -u ${{ secrets.AZURE_CLIENT_ID }} -p ${{ secrets.AZURE_CLIENT_SECRET }} --tenant ${{ secrets.AZURE_TENANT_ID }}

- name: Install Bicep CLI
run: az bicep install

- name: Generate Resource Group Name
id: generate_rg_name
run: |
echo "Generating a unique resource group name..."
TIMESTAMP=$(date +%Y%m%d%H%M%S)
COMMON_PART="pslautomationCli"
UNIQUE_RG_NAME="${COMMON_PART}${TIMESTAMP}"
echo "RESOURCE_GROUP_NAME=${UNIQUE_RG_NAME}" >> $GITHUB_ENV
echo "Generated RESOURCE_GROUP_PREFIX: ${UNIQUE_RG_NAME}"

- name: Check and Create Resource Group
id: check_create_rg
run: |
echo "RESOURCE_GROUP: ${{ env.RESOURCE_GROUP_NAME }}"
set -e
echo "Checking if resource group exists..."
rg_exists=$(az group exists --name ${{ env.RESOURCE_GROUP_NAME }})
if [ "$rg_exists" = "false" ]; then
echo "Resource group does not exist. Creating..."
az group create --name ${{ env.RESOURCE_GROUP_NAME }} --location uksouth || { echo "Error creating resource group"; exit 1; }
else
echo "Resource group already exists."
fi

- name: Generate Unique Solution Prefix
id: generate_solution_prefix
run: |
set -e
COMMON_PART="pslc"
TIMESTAMP=$(date +%s)
UPDATED_TIMESTAMP=$(echo $TIMESTAMP | tail -c 3)
UNIQUE_SOLUTION_PREFIX="${COMMON_PART}${UPDATED_TIMESTAMP}"
echo "SOLUTION_PREFIX=${UNIQUE_SOLUTION_PREFIX}" >> $GITHUB_ENV
echo "Generated SOLUTION_PREFIX: ${UNIQUE_SOLUTION_PREFIX}"

- name: Deploy Bicep Template
id: deploy
run: |
set -e
az deployment group create \
--resource-group ${{ env.RESOURCE_GROUP_NAME }} \
--template-file ClientAdvisor/Deployment/bicep/main.bicep \
--parameters solutionPrefix=${{ env.SOLUTION_PREFIX }} cosmosLocation=eastus2

- name: Update PowerBI URL
if: success()
run: |
set -e

COMMON_PART="-app-service"
application_name="${{ env.SOLUTION_PREFIX }}${COMMON_PART}"
echo "Updating application: $application_name"

# Log the Power BI URL being set
echo "Setting Power BI URL: ${{ vars.VITE_POWERBI_EMBED_URL }}"

# Update the application settings
az webapp config appsettings set --name "$application_name" --resource-group "${{ env.RESOURCE_GROUP_NAME }}" --settings VITE_POWERBI_EMBED_URL="${{ vars.VITE_POWERBI_EMBED_URL }}"

# Restart the web app
az webapp restart --resource-group "${{ env.RESOURCE_GROUP_NAME }}" --name "$application_name"

echo "Power BI URL updated successfully for application: $application_name."

- name: Delete Bicep Deployment
if: success()
run: |
set -e
echo "Checking if resource group exists..."
rg_exists=$(az group exists --name ${{ env.RESOURCE_GROUP_NAME }})
if [ "$rg_exists" = "true" ]; then
echo "Resource group exist. Cleaning..."
az group delete \
--name ${{ env.RESOURCE_GROUP_NAME }} \
--yes \
--no-wait
echo "Resource group deleted... ${{ env.RESOURCE_GROUP_NAME }}"
else
echo "Resource group does not exists."
fi

- name: Send Notification on Failure
if: failure()
run: |
RUN_URL="https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"

# Construct the email body
EMAIL_BODY=$(cat <<EOF
{
"body": "<p>Dear Team,</p><p>We would like to inform you that the Client Advisor Automation process has encountered an issue and has failed to complete successfully.</p><p><strong>Build URL:</strong> ${RUN_URL}<br> ${OUTPUT}</p><p>Please investigate the matter at your earliest convenience.</p><p>Best regards,<br>Your Automation Team</p>"
}
EOF
)

# Send the notification
curl -X POST "${{ secrets.LOGIC_APP_URL }}" \
-H "Content-Type: application/json" \
-d "$EMAIL_BODY" || echo "Failed to send notification"

105 changes: 105 additions & 0 deletions .github/workflows/RAdeploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
name: CI-Validate Deployment-Research Assistant

on:
push:
branches:
- main
paths:
- 'ResearchAssistant/**'

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3

- name: Setup Azure CLI
run: |
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
az --version # Verify installation

- name: Login to Azure
run: |
az login --service-principal -u ${{ secrets.AZURE_CLIENT_ID }} -p ${{ secrets.AZURE_CLIENT_SECRET }} --tenant ${{ secrets.AZURE_TENANT_ID }}

- name: Install Bicep CLI
run: az bicep install

- name: Generate Resource Group Name
id: generate_rg_name
run: |
echo "Generating a unique resource group name..."
TIMESTAMP=$(date +%Y%m%d%H%M%S)
COMMON_PART="pslautomationRes"
UNIQUE_RG_NAME="${COMMON_PART}${TIMESTAMP}"
echo "RESOURCE_GROUP_NAME=${UNIQUE_RG_NAME}" >> $GITHUB_ENV
echo "Generated Resource_GROUP_PREFIX: ${UNIQUE_RG_NAME}"

- name: Check and Create Resource Group
id: check_create_rg
run: |
set -e
echo "Checking if resource group exists..."
rg_exists=$(az group exists --name ${{ env.RESOURCE_GROUP_NAME }})
if [ "$rg_exists" = "false" ]; then
echo "Resource group does not exist. Creating..."
az group create --name ${{ env.RESOURCE_GROUP_NAME }} --location eastus2 || { echo "Error creating resource group"; exit 1; }
else
echo "Resource group already exists."
fi

- name: Generate Unique Solution Prefix
id: generate_solution_prefix
run: |
set -e
COMMON_PART="pslr"
TIMESTAMP=$(date +%s)
UPDATED_TIMESTAMP=$(echo $TIMESTAMP | tail -c 3)
UNIQUE_SOLUTION_PREFIX="${COMMON_PART}${UPDATED_TIMESTAMP}"
echo "SOLUTION_PREFIX=${UNIQUE_SOLUTION_PREFIX}" >> $GITHUB_ENV
echo "Generated SOLUTION_PREFIX: ${UNIQUE_SOLUTION_PREFIX}"

- name: Deploy Bicep Template
id: deploy
run: |
set -e
az deployment group create \
--resource-group ${{ env.RESOURCE_GROUP_NAME }} \
--template-file ResearchAssistant/Deployment/bicep/main.bicep \
--parameters solutionPrefix=${{ env.SOLUTION_PREFIX }}

- name: Delete Bicep Deployment
if: success()
run: |
set -e
echo "Checking if resource group exists..."
rg_exists=$(az group exists --name ${{ env.RESOURCE_GROUP_NAME }})
if [ "$rg_exists" = "true" ]; then
echo "Resource group exist. Cleaning..."
az group delete \
--name ${{ env.RESOURCE_GROUP_NAME }} \
--yes \
--no-wait
echo "Resource group deleted... ${{ env.RESOURCE_GROUP_NAME }}"
else
echo "Resource group does not exists."
fi

- name: Send Notification on Failure
if: failure()
run: |
RUN_URL="https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"

# Construct the email body
EMAIL_BODY=$(cat <<EOF
{
"body": "<p>Dear Team,</p><p>We would like to inform you that the Research Assistant Automation process has encountered an issue and has failed to complete successfully.</p><p><strong>Build URL:</strong> ${RUN_URL}<br> ${OUTPUT}</p><p>Please investigate the matter at your earliest convenience.</p><p>Best regards,<br>Your Automation Team</p>"
}
EOF
)

# Send the notification
curl -X POST "${{ secrets.LOGIC_APP_URL }}" \
-H "Content-Type: application/json" \
-d "$EMAIL_BODY" || echo "Failed to send notification"
94 changes: 94 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL Advanced"

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
schedule:
- cron: '22 13 * * 0'

jobs:
analyze:
name: Analyze (${{ matrix.language }})
# Runner size impacts CodeQL analysis time. To learn more, please see:
# - https://gh.io/recommended-hardware-resources-for-running-codeql
# - https://gh.io/supported-runners-and-hardware-resources
# - https://gh.io/using-larger-runners (GitHub.com only)
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
permissions:
# required for all workflows
security-events: write

# required to fetch internal or private CodeQL packs
packages: read

# only required for workflows in private repositories
actions: read
contents: read

strategy:
fail-fast: false
matrix:
include:
- language: javascript-typescript
build-mode: none
- language: python
build-mode: none
# CodeQL supports the following values keywords for 'language': 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift'
# Use `c-cpp` to analyze code written in C, C++ or both
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
steps:
- name: Checkout repository
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality

# If the analyze step fails for one of the languages you are analyzing with
# "We were unable to automatically build your code", modify the matrix above
# to set the build mode to "manual" for that language. Then modify this step
# to build your code.
# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
- if: matrix.build-mode == 'manual'
shell: bash
run: |
echo 'If you are using a "manual" build mode for one or more of the' \
'languages you are analyzing, replace this with the commands to build' \
'your code, for example:'
echo ' make bootstrap'
echo ' make release'
exit 1

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
22 changes: 22 additions & 0 deletions .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Pylint

on: [push]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r ClientAdvisor/App/requirements.txt
- name: Run flake8
run: flake8 --config=ClientAdvisor/App/.flake8 ClientAdvisor/App
Loading
Loading