CI: fix code coverage collection.
authorwhitequark <whitequark@whitequark.org>
Thu, 15 Oct 2020 18:09:04 +0000 (18:09 +0000)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 31 Dec 2021 15:13:27 +0000 (15:13 +0000)
This has been broken since commit d71e19e2 (2020-07-22).

.coveragerc
.github/workflows/main.yaml
nmigen/__init__.py

index 6435aa3cc52fed9b1fba433582b70b07ebe19928..74367c2ebbf12074bff61014ed3649fe9c793ff8 100644 (file)
@@ -4,7 +4,6 @@ include =
   nmigen/*
 omit =
   nmigen/test/*
-  */__init__.py
 
 [report]
 exclude_lines =
index 1545d72b56fa6e4fb6d08267783acead4fb2aac5..9bda4c5cc5e897c394066410a5a2859f1be5cca0 100644 (file)
@@ -33,7 +33,7 @@ jobs:
     - name: Run tests
       run: |
         export NMIGEN_USE_YOSYS=builtin YOSYS=yowasp-yosys SBY=yowasp-sby SMTBMC=yowasp-yosys-smtbmc
-        python -m unittest discover
+        python -m coverage run -m unittest
         codecov
   document:
     runs-on: ubuntu-latest
index 93a3a9a9fa358ccadd2dcbdab66d29f5c2afb35f..7f99c4abe21c0f089d4f3006529f8ad9fa336e54 100644 (file)
@@ -8,7 +8,7 @@ except ImportError:
     # No importlib_metadata. This shouldn't normally happen, but some people prefer not installing
     # packages via pip at all, instead using PYTHONPATH directly or copying the package files into
     # `lib/pythonX.Y/site-packages`. Although not a recommended way, we still try to support it.
-    __version__ = "unknown"
+    __version__ = "unknown" # :nocov:
 
 
 from .hdl import *