Skip to content

Commit b3a4b48

Browse files
authored
workflow: run benchmarks separately to tests (#254)
1 parent fd6c7d2 commit b3a4b48

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

.github/workflows/tests.yml

+3
Original file line numberDiff line numberDiff line change
@@ -53,5 +53,8 @@ jobs:
5353
- name: Upload coverage report
5454
uses: codecov/[email protected]
5555

56+
- name: Run benchmarks
57+
run: nox -s bench
58+
5659
- name: Build package
5760
run: nox -s build

noxfile.py

+6
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@ def tests(session: nox.Session) -> None:
2323
)
2424

2525

26+
@nox.session
27+
def bench(session: nox.Session) -> None:
28+
session.install(".[tests]")
29+
session.run("pytest", "--benchmark-only", *session.posargs)
30+
31+
2632
@nox.session
2733
def lint(session: nox.Session) -> None:
2834
session.install("pre-commit")

pyproject.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,12 @@ tests = [
4040
"pytest-sugar",
4141
"pytest-cov>=4.1.0",
4242
"pytest-mock",
43-
"mypy==1.7.1",
4443
"pytest-benchmark",
4544
"reflink",
4645
]
4746
dev = [
4847
"dvc-objects[tests]",
48+
"mypy==1.7.1",
4949
"types-tqdm",
5050
]
5151

@@ -57,7 +57,7 @@ namespaces = false
5757
dvc_objects = ["py.typed"]
5858

5959
[tool.pytest.ini_options]
60-
addopts = "-ra -Werror"
60+
addopts = "-ra -Werror --benchmark-skip"
6161

6262
[tool.coverage.run]
6363
branch = true

0 commit comments

Comments
 (0)