Skip to content

Commit

Permalink
Merge branch 'main' into kavin/c#-assistants-file-upload-download
Browse files Browse the repository at this point in the history
  • Loading branch information
singhk97 authored Aug 23, 2024
2 parents 338ce0f + 2a15d18 commit 45c7a59
Show file tree
Hide file tree
Showing 72 changed files with 1,184 additions and 194 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ jobs:
parallel: true
files: ${{ env.SOLUTION_DIR }}TestResults/coverage/lcov.info
- name: Upload Tests
uses: actions/upload-artifact@89ef406dd8d7e03cfd12d9e0a4a378f454709029 # v4.3.5
uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6
with:
name: testresults-dotnet-${{ env.dotnet-version }}
path: ${{ env.SOLUTION_DIR }}TestResults
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/dotnet-build-test-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@ jobs:
reporttypes: 'HtmlInline;lcov'
toolpath: ${{ env.SOLUTION_DIR }}report-generator-tool
- name: Upload Tests
uses: actions/upload-artifact@89ef406dd8d7e03cfd12d9e0a4a378f454709029 # v4.3.5
uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6
with:
name: testresults-dotnet-${{ matrix.dotnet-version }}
path: ${{ env.SOLUTION_DIR }}TestResults
- name: Harden Runner
uses: step-security/harden-runner@0d381219ddf674d61a7572ddd19d7941e271515c # v2.9.0
uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1
with:
egress-policy: audit
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@afb54ba388a7dca6ecae48f608c4ff05ff4cc77a # v3.25.15
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@afb54ba388a7dca6ecae48f608c4ff05ff4cc77a # v3.25.15
uses: github/codeql-action/analyze@883d8588e56d1753a8a58c1c86e88976f0c23449 # v3.26.3
with:
category: "/language:csharp"
2 changes: 1 addition & 1 deletion .github/workflows/dotnet-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
- name: Publish
run: dotnet nuget push *.nupkg --api-key ${{ secrets.GITHUB_TOKEN }} --source https://nuget.pkg.github.com/microsoft/index.json --skip-duplicate --no-symbols
- name: Upload
uses: actions/upload-artifact@89ef406dd8d7e03cfd12d9e0a4a378f454709029 # v4.3.5
uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6
with:
name: nupkg-dotnet-${{ matrix.dotnet-version }}
path: dotnet/packages/Microsoft.TeamsAI/*.nupkg
2 changes: 1 addition & 1 deletion .github/workflows/js-build-test-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@ jobs:
- name: Lint
run: yarn lint
- name: Harden Runner
uses: step-security/harden-runner@0d381219ddf674d61a7572ddd19d7941e271515c # v2.9.0
uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1
with:
egress-policy: audit
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@afb54ba388a7dca6ecae48f608c4ff05ff4cc77a # v3.25.15
uses: github/codeql-action/init@883d8588e56d1753a8a58c1c86e88976f0c23449 # v3.26.3
with:
languages: javascript
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@afb54ba388a7dca6ecae48f608c4ff05ff4cc77a # v3.25.15
uses: github/codeql-action/analyze@883d8588e56d1753a8a58c1c86e88976f0c23449 # v3.26.3
with:
category: "/language:javascript"
2 changes: 1 addition & 1 deletion .github/workflows/python-build-test-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,6 @@ jobs:
run: |
python scripts/lint.py
- name: Harden Runner
uses: step-security/harden-runner@0d381219ddf674d61a7572ddd19d7941e271515c # v2.9.0
uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1
with:
egress-policy: audit
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@afb54ba388a7dca6ecae48f608c4ff05ff4cc77a # v3.25.15
uses: github/codeql-action/init@883d8588e56d1753a8a58c1c86e88976f0c23449 # v3.26.3
with:
languages: python
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@afb54ba388a7dca6ecae48f608c4ff05ff4cc77a # v3.25.15
uses: github/codeql-action/analyze@883d8588e56d1753a8a58c1c86e88976f0c23449 # v3.26.3
with:
category: "/language:python"
4 changes: 2 additions & 2 deletions .github/workflows/scorecards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,14 @@ jobs:
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
# format to the repository Actions tab.
- name: "Upload artifact"
uses: actions/upload-artifact@89ef406dd8d7e03cfd12d9e0a4a378f454709029 # v4.3.5
uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6
with:
name: SARIF file
path: results.sarif
retention-days: 5

# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@afb54ba388a7dca6ecae48f608c4ff05ff4cc77a # v3.25.15
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
6 changes: 3 additions & 3 deletions js/packages/teams-ai/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
},
"dependencies": {
"@azure/openai-assistants": "1.0.0-beta.5",
"@azure/msal-node": "^2.12.0",
"axios": "^1.7.3",
"@azure/msal-node": "^2.13.0",
"axios": "^1.7.4",
"botbuilder-dialogs": "^4.22.3",
"botframework-connector": "^4.22.1",
"botframework-schema": "^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 @@ -20,15 +20,15 @@
},
"dependencies": {
"@microsoft/teams-ai": "~1.3.1",
"axios": "^1.7.3",
"axios": "^1.7.4",
"botbuilder": "^4.22.3",
"dotenv": "^16.4.5",
"openai": "4.28.4",
"replace": "~1.2.0",
"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/
Loading

0 comments on commit 45c7a59

Please sign in to comment.