Skip to content

Commit

Permalink
chore: Add code coverage for JS
Browse files Browse the repository at this point in the history
  • Loading branch information
BeyondEvil committed Mar 22, 2023
1 parent 40a80d5 commit ad9badb
Show file tree
Hide file tree
Showing 5 changed files with 2,686 additions and 22 deletions.
22 changes: 17 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,19 @@ jobs:
run: npm ci
- name: Run tests
run: npm run unit
- name: Upload coverage to codecov
if: >-
${{
! github.event.schedule &&
github.repository_owner == 'pytest-dev'
}}
uses: codecov/codecov-action@v3
with:
fail_ci_if_error: true
files: ./cobertura-coverage.xml
flags: js_tests
name: ubuntu-latest-node-16
verbose: true

test_unit:
name: ${{ matrix.os }} - ${{ matrix.python-version }}
Expand Down Expand Up @@ -99,8 +112,8 @@ jobs:
with:
fail_ci_if_error: true
files: ./coverage.xml
flags: tests
name: ${{ matrix.os }}-${{ matrix.python-version }}
flags: py_unit_tests
name: ${{ matrix.os }}-python-${{ matrix.python-version }}
verbose: true

test_integration:
Expand Down Expand Up @@ -161,7 +174,6 @@ jobs:
if: ${{ matrix.tox-env }}
run: tox -e ${{ matrix.tox-env }} -- testing/test_integration.py

# TODO: https://github.com/pytest-dev/pytest-html/issues/481
- name: Upload coverage to codecov
if: >-
${{
Expand All @@ -173,6 +185,6 @@ jobs:
with:
fail_ci_if_error: true
files: ./coverage.xml
flags: tests
name: ${{ matrix.tox-env }}
flags: py_integration_tests
name: ubuntu-latest-${{ matrix.python-version }}
verbose: true
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ dist
# Codecov
.coverage
coverage.xml
cobertura-coverage.xml

# IDE Specific files/folders
## Pycharm IDE - Jetbrains
Expand Down Expand Up @@ -53,3 +54,5 @@ docs/_build/

*.html
assets/

.nyc_output
5 changes: 5 additions & 0 deletions .nycrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"report-dir": ".",
"reporter": ["cobertura"],
"exclude": ["testing/**"]
}
Loading

0 comments on commit ad9badb

Please sign in to comment.