diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b5c65e0..c578974 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -53,5 +53,8 @@ jobs: - name: Upload coverage report uses: codecov/codecov-action@v3.1.4 + - name: Run benchmarks + run: nox -s bench + - name: Build package run: nox -s build diff --git a/noxfile.py b/noxfile.py index 1a7ec42..1475475 100644 --- a/noxfile.py +++ b/noxfile.py @@ -23,6 +23,12 @@ def tests(session: nox.Session) -> None: ) +@nox.session +def bench(session: nox.Session) -> None: + session.install(".[tests]") + session.run("pytest", "--benchmark-only", *session.posargs) + + @nox.session def lint(session: nox.Session) -> None: session.install("pre-commit") diff --git a/pyproject.toml b/pyproject.toml index 4bb4ee0..b10577a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -40,12 +40,12 @@ tests = [ "pytest-sugar", "pytest-cov>=4.1.0", "pytest-mock", - "mypy==1.7.1", "pytest-benchmark", "reflink", ] dev = [ "dvc-objects[tests]", + "mypy==1.7.1", "types-tqdm", ] @@ -57,7 +57,7 @@ namespaces = false dvc_objects = ["py.typed"] [tool.pytest.ini_options] -addopts = "-ra -Werror" +addopts = "-ra -Werror --benchmark-skip" [tool.coverage.run] branch = true