Repository: r5py/r5py (language: python)

Issue:
BUG: Fix GA workflow in terms of pytest coverage
Currently the pytest coverage only covers the files in `tests`.. Which is the reason for incorrect 100 % coverage badge that we have atm. 

Was debugging this for pyrosm and found a fix, so can do the same tricks for r5py as well.    
migrate to github actions



Discussion / hints:

Fix patch:
diff --git a/.coveragerc b/.coveragerc
deleted file mode 100644
index 013dd202..00000000
--- a/.coveragerc
+++ /dev/null
@@ -1,2 +0,0 @@
-[report]
-show_missing = True
diff --git a/pyproject.toml b/pyproject.toml
index aafbb4a8..87c29ad3 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,3 +1,11 @@
 [build-system]
-requires = ["setuptools>=50.0.0", "wheel"]
 build-backend = "setuptools.build_meta"
+requires = ["setuptools>=50.0.0", "wheel"]
+
+[tool.pytest.ini_options]
+addopts = "-r s --cov=./src/r5py --cov-append --cov-report term-missing --cov-report xml"
+pythonpath = ["src"]
+testpaths = ["tests"]
+
+[tool.coverage.run]
+omit = ["tests/*"]
diff --git a/tox.ini b/tox.ini
deleted file mode 100644
index c213f0a1..00000000
--- a/tox.ini
+++ /dev/null
@@ -1,9 +0,0 @@
-[tox]
-envlist = clean,py3
-isolated_build = True
-
-[testenv]
-deps =
-    pytest
-    pytest-cov
-commands = pytest --cov --cov-report xml


Test patch:
diff --git a/.github/workflows/lint-test-upon-push.yml b/.github/workflows/lint-test-upon-push.yml
index 0de7c736..c4bd4fe4 100644
--- a/.github/workflows/lint-test-upon-push.yml
+++ b/.github/workflows/lint-test-upon-push.yml
@@ -62,28 +62,26 @@ jobs:
       - name: Setup Conda
         uses: conda-incubator/setup-miniconda@v2.1.1
         with:
-          auto-update-conda: true
-          auto-activate-base: false
-          activate-environment: test
           environment-file: ${{ matrix.env }}
+          miniforge-version: latest
+          miniforge-variant: Mambaforge
+          activate-environment: test
+          auto-activate-base: false
           channel-priority: strict
 
       - name: Make sure pytest{,-cov} are installed
         shell: bash -l {0}
-        run: conda install pytest pytest-cov
-
-      - name: Install r5py
-        shell: bash -l {0}
-        run: pip install .
+        run: mamba install -c conda-forge pytest pytest-cov
 
       - name: Check environment
         shell: bash -l {0}
         run: |
           conda info
           conda list
+
       - name: Test r5py
         shell: bash -l {0}
-        run: pytest --cov --cov-report xml
+        run: pytest
 
       - name: Update codecov.io
         uses: codecov/codecov-action@v3.1.0
diff --git a/tests/conftest.py b/tests/conftest.py
index af7cf37d..8889a74d 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -2,12 +2,6 @@
 
 
 import pytest
-import pathlib
-import sys
-
-
-
-sys.path.insert(0, pathlib.Path().absolute().parent / "src")
 
 
 @pytest.fixture(scope="session", autouse=True)