Skip to content

Commit

Permalink
Merge branch 'main' into chyuan/csharp-ut
Browse files Browse the repository at this point in the history
  • Loading branch information
aacebo authored Jan 3, 2024
2 parents 9e0755a + 4997d60 commit 5bc953f
Show file tree
Hide file tree
Showing 6 changed files with 120 additions and 14 deletions.
101 changes: 101 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
#
# This workflow will run a coverage report
#

name: Coverage

on:
workflow_dispatch:
push:
branches: ['**']
paths: [
'.github/workflows/coverage.yml',
'js/**',
'dotnet/**'
]

permissions: read-all

jobs:
javascript:
name: Javascript
runs-on: ubuntu-latest
environment: main
env:
node-version: 18.x
defaults:
run:
shell: bash
working-directory: js/
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Setup NodeJS ${{ env.node-version }}
uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
with:
node-version: ${{ env.node-version }}
- name: Install Dependencies
run: yarn --frozen-lockfile
- name: Test
run: yarn test:nyc:report
- name: Coveralls
uses: coverallsapp/[email protected]
with:
flag-name: javascript
parallel: true
files: js/coverage/lcov.info

dotnet:
name: DotNet
runs-on: windows-latest
environment: main
env:
dotnet-version: 7.0
SOLUTION_DIR: dotnet/packages/Microsoft.TeamsAI/
defaults:
run:
shell: bash
working-directory: dotnet/packages/Microsoft.TeamsAI/
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Setup .NET ${{ env.dotnet-version }}
uses: actions/setup-dotnet@4d6c8fcf3c8f7a60068d26b594648e99df24cee3 # v4.0.0
with:
dotnet-version: ${{ env.dotnet-version }}
- name: Test
run: dotnet test Microsoft.TeamsAI.Tests/Microsoft.Teams.AI.Tests.csproj --verbosity normal --logger trx --results-directory ./TestResults --collect:"XPlat Code Coverage" --configuration Release
- name: Coverage
uses: danielpalme/ReportGenerator-GitHub-Action@4d510cbed8a05af5aefea46c7fd6e05b95844c89 # 5.2.0
with:
reports: ${{ env.SOLUTION_DIR }}TestResults/*/coverage.cobertura.xml
targetdir: ${{ env.SOLUTION_DIR }}TestResults/coverage
reporttypes: 'HtmlInline;lcov'
toolpath: ${{ env.SOLUTION_DIR }}report-generator-tool
- name: Coveralls
uses: coverallsapp/[email protected]
with:
flag-name: dotnet
parallel: true
files: ${{ env.SOLUTION_DIR }}TestResults/coverage/lcov.info
- name: Upload Tests
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4.0.0
with:
name: testresults-dotnet-${{ env.dotnet-version }}
path: ${{ env.SOLUTION_DIR }}TestResults

finish:
needs: [javascript, dotnet]
if: ${{ always() }}
runs-on: ubuntu-latest
environment: main
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@v2
with:
parallel-finished: true
carryforward: 'javascript,dotnet'
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 @@ -9,7 +9,7 @@ on:
workflow_dispatch:
push:
branches: ['**']
paths: ['dotnet/**']
paths: ['.github/workflows/dotnet-*.yml', 'dotnet/**']

permissions: read-all

Expand Down Expand Up @@ -47,7 +47,7 @@ jobs:
with:
reports: ${{ env.SOLUTION_DIR }}TestResults/*/coverage.cobertura.xml
targetdir: ${{ env.SOLUTION_DIR }}TestResults/coverage
reporttypes: HtmlInline
reporttypes: 'HtmlInline;lcov'
toolpath: ${{ env.SOLUTION_DIR }}report-generator-tool
- name: Upload Tests
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4.0.0
Expand Down
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 @@ -9,7 +9,7 @@ on:
workflow_dispatch:
push:
branches: ['**']
paths: ['js/**']
paths: ['.github/workflows/js-*.yml', 'js/**']

permissions: read-all

Expand Down
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# ![teams logo](https://github.com/microsoft/teams-ai/assets/14900841/10a0fbac-9d31-46d5-ad65-0eeb33b787a8) Teams AI Library

[![Build Status](https://dev.azure.com/DomoreexpGithub/Github_Pipelines/_apis/build/status%2Fteams-ai%2Fmicrosoft.teams-ai?branchName=main)](https://dev.azure.com/DomoreexpGithub/Github_Pipelines/_build/latest?definitionId=4&branchName=main)
[![Coverage Status](https://coveralls.io/repos/github/microsoft/teams-ai/badge.svg?branch=main)](https://coveralls.io/github/microsoft/teams-ai?branch=main)

| Name | Status |
|---------------|-----------------------|
| Javascript | [![Javascript Build Status](https://dev.azure.com/DomoreexpGithub/Github_Pipelines/_apis/build/status%2Fteams-ai%2Fmicrosoft.teams-ai.javascript?branchName=main)](https://dev.azure.com/DomoreexpGithub/Github_Pipelines/_build/latest?definitionId=5&branchName=main) |
| C# | [![C# Build Status](https://dev.azure.com/DomoreexpGithub/Github_Pipelines/_apis/build/status%2Fteams-ai%2Fmicrosoft.teams-ai.dotnet?branchName=main)](https://dev.azure.com/DomoreexpGithub/Github_Pipelines/_build/latest?definitionId=4&branchName=main) |

Welcome to the Teams AI Library! This SDK is specifically designed to assist you in creating bots capable of interacting with Teams and Microsoft 365 applications. It is constructed using the [Bot Framework SDK](https://github.com/microsoft/botbuilder-js) as its foundation, simplifying the process of developing bots that interact with Teams' artificial intelligence capabilities.

Expand Down
2 changes: 1 addition & 1 deletion js/.nycrc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"**/*.spec.ts",
"packages/**/src/**/index.ts"
],
"reporter": ["html", "text"],
"reporter": ["html", "text", "lcov"],
"all": true,
"cache": true
}
18 changes: 9 additions & 9 deletions pipelines/javascript.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ steps:
workingDirectory: 'js'
displayName: 'Build'

- script: 'yarn test'
- script: 'yarn test:nyc:report'
workingDirectory: 'js'
displayName: 'Test'

Expand All @@ -51,11 +51,11 @@ steps:
PathToPublish: '$(Build.ArtifactStagingDirectory)/js/packages/teams-ai'
ArtifactName: Packages

- task: Npm@1
displayName: 'Publish'
continueOnError: true
inputs:
command: publish
workingDir: '$(Build.ArtifactStagingDirectory)/js/packages/teams-ai'
publishRegistry: useFeed
publishFeed: 'Github_Pipelines/Teams'
# - task: Npm@1
# displayName: 'Publish'
# continueOnError: true
# inputs:
# command: publish
# workingDir: '$(Build.ArtifactStagingDirectory)/js/packages/teams-ai'
# publishRegistry: useFeed
# publishFeed: 'Github_Pipelines/Teams'

0 comments on commit 5bc953f

Please sign in to comment.