Skip to content

[repo] docs: updating migration and docs for python (#1351) #378

[repo] docs: updating migration and docs for python (#1351)

[repo] docs: updating migration and docs for python (#1351) #378

Workflow file for this run

#
# This workflow will run a coverage report
#
name: Coverage
on:
workflow_dispatch:
push:
branches: ['**']
paths: [
'.github/workflows/coverage.yml',
'js/**',
'dotnet/**',
'python/**'
]
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@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
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@b067e0c5d288fb4277b9f397b2dc6013f60381f0 # 5.2.2
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@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
with:
name: testresults-dotnet-${{ env.dotnet-version }}
path: ${{ env.SOLUTION_DIR }}TestResults
python:
name: Python
runs-on: ubuntu-latest
environment: main
env:
python-version: 3.8
defaults:
run:
working-directory: python/packages/ai
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Setup Python ${{ env.python-version }}
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
with:
python-version: ${{ env.python-version }}
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
poetry install
- name: Test
run: |
poetry run test
- name: Coveralls
uses: coverallsapp/[email protected]
with:
flag-name: python
parallel: true
files: python/packages/ai/coverage/lcov.info
finish:
needs: [javascript, dotnet, python]
if: ${{ always() }}
runs-on: ubuntu-latest
environment: main
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@v2
with:
parallel-finished: true
carryforward: 'javascript,dotnet,python'