Repository: zytedata/zyte-common-items (language: python)

Issue:
Fix coverage detection
Currently tests don't collect coverage data and print a warning about that. Running pytest directly works while running tox doesn't. I feel like it's because of the path problem currently hidden by `PY_IGNORE_IMPORTMISMATCH=1` (as coverage collection should depend on file paths), but I don't know how to fix it.


Discussion / hints:

Fix patch:
diff --git a/tox.ini b/tox.ini
index 28f36fd..1350029 100644
--- a/tox.ini
+++ b/tox.ini
@@ -14,8 +14,6 @@ deps =
 [testenv]
 deps =
     {[base]deps}
-setenv =
-    PY_IGNORE_IMPORTMISMATCH=1
 commands =
     py.test \
         --cov-report=term-missing:skip-covered \
@@ -24,7 +22,7 @@ commands =
         --cov-report=xml \
         --cov=zyte_common_items \
         --doctest-glob="*.rst" --doctest-modules \
-        {posargs:docs tests zyte_common_items}
+        {posargs:zyte_common_items docs tests}
 
 
 [testenv:min]


Test patch:
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index b5ff282..40a34ee 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -70,3 +70,7 @@ jobs:
         tox -e docs
         tox -e twinecheck
         tox -e linters
+    - name: coverage
+      uses: codecov/codecov-action@v4
+      with:
+        token: ${{ secrets.CODECOV_TOKEN }}