Skip to content

Lock down typescript to patch updates only and remove unused @microso… #1596

Lock down typescript to patch updates only and remove unused @microso…

Lock down typescript to patch updates only and remove unused @microso… #1596

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@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Setup NodeJS ${{ env.node-version }}
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
with:
node-version: ${{ env.node-version }}
- name: Install Dependencies
run: yarn --frozen-lockfile
- name: Test
run: yarn test:nyc:report
- name: Coveralls
uses: coverallsapp/github-action@v2.2.3
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@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Setup .NET ${{ env.dotnet-version }}
uses: actions/setup-dotnet@6bd8b7f7774af54e05809fcc5431931b3eb1ddee # v4.0.1
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@e3af7259842d9c814021ea121f85526e0872b25f # 5.3.9
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/github-action@v2.2.3
with:
flag-name: dotnet
parallel: true
files: ${{ env.SOLUTION_DIR }}TestResults/coverage/lcov.info
- name: Upload Tests
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
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@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Setup Python ${{ env.python-version }}
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.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/github-action@v2.2.3
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'