-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (52 loc) · 1.56 KB
/
coverage.yml
File metadata and controls
55 lines (52 loc) · 1.56 KB
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
name: Coverage
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
python-coverage:
name: Python Coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install dependencies
run: pip install pytest pytest-asyncio pytest-cov
- name: Run tests with coverage
run: |
cd src/python && python -m pytest ../../tests/ \
--cov=modelmesh \
--cov-report=xml:../../coverage-python.xml \
--cov-report=term-missing \
-v
- name: Upload Python coverage
uses: codecov/codecov-action@v4
with:
files: coverage-python.xml
flags: python
fail_ci_if_error: false
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
typescript-coverage:
name: TypeScript Coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "20"
- name: Install dependencies
run: npm ci
- name: Run tests with coverage
run: cd src/typescript && npx jest --coverage --coverageReporters=text --coverageReporters=cobertura
- name: Upload TypeScript coverage
uses: codecov/codecov-action@v4
with:
files: src/typescript/coverage/cobertura-coverage.xml
flags: typescript
fail_ci_if_error: false
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}