Skip to content

Commit 8576579

Browse files
committed
Enable code coverage
1 parent 8af2f14 commit 8576579

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

.coveragerc

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ exclude_lines =
99
pragma: no cover
1010

1111
# ignore pass statements that are not run:
12-
# sometimes you need them to make a block (especially for unittetsts)
12+
# sometimes you need them to make a block (especially for unittests)
1313
# need to be really careful with this one because 'pass' shows up in other places as well
1414
\spass\s
1515
\spass$
@@ -28,4 +28,8 @@ exclude_lines =
2828

2929
ignore_errors = True
3030

31-
omit = .tox/*
31+
omit =
32+
.tox/*
33+
*/ctypes/*
34+
six.py
35+
pyparsing.py

.github/workflows/python-package.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ jobs:
2020
- name: Install dependencies
2121
run: |
2222
python -m pip install --upgrade pip
23-
pip install tox tox-gh-actions
23+
pip install tox tox-gh-actions coverage
2424
- name: Test with tox
25-
run: tox
25+
run: tox
26+
- name: Upload coverage to Codecov
27+
uses: codecov/codecov-action@v1

tox.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ setenv =
2424
PYTHONPATH = {toxinidir}
2525

2626
commands =
27-
test: nosetests ./tests #--with-coverage
28-
test: nosetests ./tests/rtllib #--with-coverage
27+
test: nosetests ./tests --with-coverage
28+
test: nosetests ./tests/rtllib --with-coverage
2929
test: pylint -E pyrtl/
3030
pycodestyle: pycodestyle --max-line-length=100 --ignore=W503 pyrtl/
3131
pycodestyle: pycodestyle --max-line-length=100 --ignore=W503 examples/

0 commit comments

Comments
 (0)