diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 1975102cd3..33c89bee09 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -43,7 +43,7 @@ jobs: run: | python -m pip install --upgrade pip # cpu version of pytorch - pip install .[test] + pip install -e .[test] - name: Test with pytest run: | make test diff --git a/pyproject.toml b/pyproject.toml index a72149d682..ae9d4507a2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -33,4 +33,7 @@ doctest_optionflags = [ "NORMALIZE_WHITESPACE", "ELLIPSIS", "NUMBER", -] \ No newline at end of file +] + +[tool.pytest.ini_options] +addopts = "--cov=src/peft --cov-report=term-missing" diff --git a/setup.py b/setup.py index 8b4978bde2..585f67a782 100644 --- a/setup.py +++ b/setup.py @@ -18,7 +18,7 @@ extras["quality"] = ["black ~= 22.0", "ruff>=0.0.241", "urllib3<=2.0.0"] extras["docs_specific"] = ["hf-doc-builder"] extras["dev"] = extras["quality"] + extras["docs_specific"] -extras["test"] = extras["dev"] + ["pytest", "pytest-xdist", "parameterized", "datasets", "diffusers"] +extras["test"] = extras["dev"] + ["pytest", "pytest-cov", "pytest-xdist", "parameterized", "datasets", "diffusers"] setup( name="peft",