-
Notifications
You must be signed in to change notification settings - Fork 189
135 lines (128 loc) · 3.97 KB
/
coverage.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
#
# 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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Setup NodeJS ${{ env.node-version }}
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Setup .NET ${{ env.dotnet-version }}
uses: actions/setup-dotnet@3e891b0cb619bf60e2c25674b222b8940e2c1c25 # v4.1.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@810356ce07a94200154301fb73d878e327b2dd58 # 5.4.1
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@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Setup Python ${{ env.python-version }}
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.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'