Skip to content

Commit

Permalink
workflow: run benchmarks separately to tests (#254)
Browse files Browse the repository at this point in the history
  • Loading branch information
skshetry authored Dec 7, 2023
1 parent fd6c7d2 commit b3a4b48
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,8 @@ jobs:
- name: Upload coverage report
uses: codecov/[email protected]

- name: Run benchmarks
run: nox -s bench

- name: Build package
run: nox -s build
6 changes: 6 additions & 0 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
]

Expand All @@ -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
Expand Down

0 comments on commit b3a4b48

Please sign in to comment.