Skip to content

Commit

Permalink
Merge branch 'main' into lilyydu/py-toolsfix
Browse files Browse the repository at this point in the history
  • Loading branch information
lilyydu authored Aug 21, 2024
2 parents a42a4bd + 7eaed02 commit 632ba26
Show file tree
Hide file tree
Showing 59 changed files with 975 additions and 163 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/dotnet-codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Initialize CodeQL
uses: github/codeql-action/init@eb055d739abdc2e8de2e5f4ba1a8b246daa779aa # v3.26.0
uses: github/codeql-action/init@883d8588e56d1753a8a58c1c86e88976f0c23449 # v3.26.3
with:
languages: csharp
- name: Setup .NET
Expand All @@ -50,6 +50,6 @@ jobs:
working-directory: dotnet/packages/Microsoft.TeamsAI/
run: dotnet build Microsoft.Teams.AI.sln --configuration Release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@eb055d739abdc2e8de2e5f4ba1a8b246daa779aa # v3.26.0
uses: github/codeql-action/analyze@883d8588e56d1753a8a58c1c86e88976f0c23449 # v3.26.3
with:
category: "/language:csharp"
4 changes: 2 additions & 2 deletions .github/workflows/js-codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ jobs:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Initialize CodeQL
uses: github/codeql-action/init@eb055d739abdc2e8de2e5f4ba1a8b246daa779aa # v3.26.0
uses: github/codeql-action/init@883d8588e56d1753a8a58c1c86e88976f0c23449 # v3.26.3
with:
languages: javascript
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@eb055d739abdc2e8de2e5f4ba1a8b246daa779aa # v3.26.0
uses: github/codeql-action/analyze@883d8588e56d1753a8a58c1c86e88976f0c23449 # v3.26.3
with:
category: "/language:javascript"
4 changes: 2 additions & 2 deletions .github/workflows/python-codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ jobs:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Initialize CodeQL
uses: github/codeql-action/init@eb055d739abdc2e8de2e5f4ba1a8b246daa779aa # v3.26.0
uses: github/codeql-action/init@883d8588e56d1753a8a58c1c86e88976f0c23449 # v3.26.3
with:
languages: python
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@eb055d739abdc2e8de2e5f4ba1a8b246daa779aa # v3.26.0
uses: github/codeql-action/analyze@883d8588e56d1753a8a58c1c86e88976f0c23449 # v3.26.3
with:
category: "/language:python"
2 changes: 1 addition & 1 deletion .github/workflows/scorecards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,6 @@ jobs:

# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@eb055d739abdc2e8de2e5f4ba1a8b246daa779aa # v3.26.0
uses: github/codeql-action/upload-sarif@883d8588e56d1753a8a58c1c86e88976f0c23449 # v3.26.3
with:
sarif_file: results.sarif
6 changes: 3 additions & 3 deletions js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,16 @@
"devDependencies": {
"@azure/logger": "^1.1.4",
"@azure/ms-rest-js": "2.7.0",
"@microsoft/api-extractor": "^7.47.5",
"@microsoft/api-extractor": "^7.47.6",
"@standardlabs/is-private": "^1.0.1",
"@types/jsonwebtoken": "9.0.4",
"@types/lodash": "^4.17.7",
"@types/mocha": "^10.0.7",
"@types/node": "^20.14.15",
"@types/node": "^20.16.1",
"@types/sinon": "^10.0.19",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"@typescript-eslint/parser": "^6.21.0",
"applicationinsights": "^2.9.5",
"applicationinsights": "^2.9.6",
"browserify": "^17.0.0",
"chai": "^4.5.0",
"depcheck": "^1.4.7",
Expand Down
4 changes: 2 additions & 2 deletions js/packages/teams-ai/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
},
"dependencies": {
"@azure/openai-assistants": "1.0.0-beta.5",
"@azure/msal-node": "^2.12.0",
"@azure/msal-node": "^2.13.0",
"axios": "^1.7.4",
"botbuilder-dialogs": "^4.22.3",
"botframework-connector": "^4.22.1",
Expand All @@ -50,7 +50,7 @@
"@types/express": "^4.17.21",
"@types/jsonwebtoken": "^9.0.4",
"@types/mocha": "^10.0.7",
"@types/node": "^20.14.15",
"@types/node": "^20.16.1",
"@types/uuid": "^9.0.8",
"botbuilder-core": "^4.22.1",
"eslint": "^8.57.0",
Expand Down
3 changes: 3 additions & 0 deletions js/samples/01.getting-started/a.echoBot/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -112,3 +112,6 @@ env/.env.*.user
env/.env.local
appPackage/build
.deployment
env/.env.testtool
.localConfigs.testTool
devTools/
12 changes: 12 additions & 0 deletions js/samples/01.getting-started/a.echoBot/.vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,18 @@
"order": 2
},
"stopAll": true
},
{
"name": "Debug in Test Tool",
"configurations": [
"Attach to Local Service"
],
"preLaunchTask": "Start Teams App (Test Tool)",
"presentation": {
"group": "local",
"order": 1
},
"stopAll": true
}
]
}
99 changes: 99 additions & 0 deletions js/samples/01.getting-started/a.echoBot/.vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,105 @@
"endsPattern": "restify listening to|Bot/ME service listening at|[nodemon] app crashed"
}
}
},
{
"label": "Start Teams App (Test Tool)",
"dependsOn": [
"Validate prerequisites (Test Tool)",
"Deploy (Test Tool)",
"Start application (Test Tool)",
"Start Test Tool",
],
"dependsOrder": "sequence"
},
{
// Check all required prerequisites.
// See https://aka.ms/teamsfx-tasks/check-prerequisites to know the details and how to customize the args.
"label": "Validate prerequisites (Test Tool)",
"type": "teamsfx",
"command": "debug-check-prerequisites",
"args": {
"prerequisites": [
"nodejs", // Validate if Node.js is installed.
"portOccupancy" // Validate available ports to ensure those debug ones are not occupied.
],
"portOccupancy": [
3978, // app service port
9239, // app inspector port for Node.js debugger
56150, // test tool port
]
}
},
{
// Build project.
// See https://aka.ms/teamsfx-tasks/deploy to know the details and how to customize the args.
"label": "Deploy (Test Tool)",
"type": "teamsfx",
"command": "deploy",
"args": {
"env": "testtool",
}
},
{
"label": "Start application (Test Tool)",
"type": "shell",
"command": "npm run dev:teamsfx:testtool",
"isBackground": true,
"options": {
"cwd": "${workspaceFolder}",
},
"problemMatcher": {
"pattern": [
{
"regexp": "^.*$",
"file": 0,
"location": 1,
"message": 2
}
],
"background": {
"activeOnStart": true,
"beginsPattern": "[nodemon] starting",
"endsPattern": "restify listening to|Bot/ME service listening at|[nodemon] app crashed"
}
}
},
{
"label": "Start Test Tool",
"type": "shell",
"command": "npm run dev:teamsfx:launch-testtool",
"isBackground": true,
"options": {
"env": {
"PATH": "${workspaceFolder}/devTools/teamsapptester/node_modules/.bin:${env:PATH}"
}
},
"windows": {
"options": {
"env": {
"PATH": "${workspaceFolder}/devTools/teamsapptester/node_modules/.bin;${env:PATH}"
}
}
},
"problemMatcher": {
"pattern": [
{
"regexp": "^.*$",
"file": 0,
"location": 1,
"message": 2
}
],
"background": {
"activeOnStart": true,
"beginsPattern": ".*",
"endsPattern": "Listening on"
}
},
"presentation": {
"panel": "dedicated",
"reveal": "silent"
}
}
]
}
13 changes: 13 additions & 0 deletions js/samples/01.getting-started/a.echoBot/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ This sample shows how to incorporate a basic conversational flow into a Microsof
- [Setting up the sample](#setting-up-the-sample)
- [Testing the sample](#testing-the-sample)
- [Using Teams Toolkit for Visual Studio Code](#using-teams-toolkit-for-visual-studio-code)
- [Using Teams App test tool](#using-teams-app-test-tool)

<!-- /code_chunk_output -->

Expand Down Expand Up @@ -81,3 +82,15 @@ The simplest way to run this sample in Teams is to use Teams Toolkit for Visual
1. In the browser that launches, select the **Add** button to install the app to Teams..
> If you do not have permission to upload custom apps (sideloading), Teams Toolkit will recommend creating and using a Microsoft 365 Developer Program account - a free program to get your own dev environment sandbox that includes Teams.
### Using Teams App test tool
Use **Teams App test tool** (integrated into teams Toolkit) to run this sample.
1. Ensure you have downloaded and installed [Visual Studio Code](https://code.visualstudio.com/docs/setup/setup-overview)
1. Install the [Teams Toolkit extension](https://marketplace.visualstudio.com/items?itemName=TeamsDevApp.ms-teams-vscode-extension)
1. Copy this sample into a new folder outside of teams-ai
1. Select File > Open Folder in VS Code and choose this sample's directory
1. From the left pane, select **Run and Debug**(Ctrl+Shift+D) and select **Debug in Test Tool** in dropdown list.
1. Select Debug > Start Debugging or F5 to run the app.
1. The browser will pop up to open Teams App Test Tool.
5 changes: 5 additions & 0 deletions js/samples/01.getting-started/a.echoBot/env/.env.testtool
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
TEAMSFX_ENV=testtool

# Environment variables used by test tool
TEAMSAPPTESTER_PORT=56150
TEAMSFX_NOTIFICATION_STORE_FILENAME=.notification.testtoolstore.json
7 changes: 4 additions & 3 deletions js/samples/01.getting-started/a.echoBot/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,16 @@
"restify": "~11.1.0"
},
"devDependencies": {
"@types/node": "^20.14.15",
"@types/node": "^20.16.1",
"@types/restify": "^8.5.12",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"@typescript-eslint/parser": "^6.21.0",
"env-cmd": "^10.1.0",
"eslint": "^8.57.0",
"nodemon": "~3.0.1",
"prettier": "^3.3.3",
"rimraf": "^5.0.10",
"typescript": "^5.5.4",
"ts-node": "^10.9.2"
"ts-node": "^10.9.2",
"typescript": "^5.5.4"
}
}
24 changes: 24 additions & 0 deletions js/samples/01.getting-started/a.echoBot/teamsapp.testtool.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# yaml-language-server: $schema=https://aka.ms/teams-toolkit/v1.5/yaml.schema.json
# Visit https://aka.ms/teamsfx-v5.0-guide for details on this file
# Visit https://aka.ms/teamsfx-actions for details on actions
version: v1.5

deploy:
# Install development tool(s)
- uses: devTool/install
with:
testTool:
version: ~0.2.1
symlinkDir: ./devTools/teamsapptester

# Run npm command
- uses: cli/runNpmCommand
with:
args: install --no-audit --workspaces=false

# Generate runtime environment variables
- uses: file/createOrUpdateEnvironmentFile
with:
target: ./.localConfigs.testTool
envs:
TEAMSFX_NOTIFICATION_STORE_FILENAME: ${{TEAMSFX_NOTIFICATION_STORE_FILENAME}}
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"restify": "~11.1.0"
},
"devDependencies": {
"@types/node": "^20.14.15",
"@types/node": "^20.16.1",
"@types/restify": "^8.5.12",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"@typescript-eslint/parser": "^6.21.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,3 +112,6 @@ env/.env.*.user
env/.env.local
appPackage/build
.deployment
env/.env.testtool
.localConfigs.testTool
devTools/
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,18 @@
"order": 2
},
"stopAll": true
},
{
"name": "Debug in Test Tool",
"configurations": [
"Attach to Local Service"
],
"preLaunchTask": "Start Teams App (Test Tool)",
"presentation": {
"group": "local",
"order": 1
},
"stopAll": true
}
]
}
Loading

0 comments on commit 632ba26

Please sign in to comment.