Skip to content

Commit ad9badb

Browse files
committed
chore: Add code coverage for JS
1 parent 40a80d5 commit ad9badb

File tree

5 files changed

+2686
-22
lines changed

5 files changed

+2686
-22
lines changed

.github/workflows/tests.yml

+17-5
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,19 @@ jobs:
1717
run: npm ci
1818
- name: Run tests
1919
run: npm run unit
20+
- name: Upload coverage to codecov
21+
if: >-
22+
${{
23+
! github.event.schedule &&
24+
github.repository_owner == 'pytest-dev'
25+
}}
26+
uses: codecov/codecov-action@v3
27+
with:
28+
fail_ci_if_error: true
29+
files: ./cobertura-coverage.xml
30+
flags: js_tests
31+
name: ubuntu-latest-node-16
32+
verbose: true
2033

2134
test_unit:
2235
name: ${{ matrix.os }} - ${{ matrix.python-version }}
@@ -99,8 +112,8 @@ jobs:
99112
with:
100113
fail_ci_if_error: true
101114
files: ./coverage.xml
102-
flags: tests
103-
name: ${{ matrix.os }}-${{ matrix.python-version }}
115+
flags: py_unit_tests
116+
name: ${{ matrix.os }}-python-${{ matrix.python-version }}
104117
verbose: true
105118

106119
test_integration:
@@ -161,7 +174,6 @@ jobs:
161174
if: ${{ matrix.tox-env }}
162175
run: tox -e ${{ matrix.tox-env }} -- testing/test_integration.py
163176

164-
# TODO: https://github.com/pytest-dev/pytest-html/issues/481
165177
- name: Upload coverage to codecov
166178
if: >-
167179
${{
@@ -173,6 +185,6 @@ jobs:
173185
with:
174186
fail_ci_if_error: true
175187
files: ./coverage.xml
176-
flags: tests
177-
name: ${{ matrix.tox-env }}
188+
flags: py_integration_tests
189+
name: ubuntu-latest-${{ matrix.python-version }}
178190
verbose: true

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ dist
99
# Codecov
1010
.coverage
1111
coverage.xml
12+
cobertura-coverage.xml
1213

1314
# IDE Specific files/folders
1415
## Pycharm IDE - Jetbrains
@@ -53,3 +54,5 @@ docs/_build/
5354

5455
*.html
5556
assets/
57+
58+
.nyc_output

.nycrc

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"report-dir": ".",
3+
"reporter": ["cobertura"],
4+
"exclude": ["testing/**"]
5+
}

0 commit comments

Comments
 (0)