summaryrefslogtreecommitdiff
path: root/tests/conftest.py
diff options
context:
space:
mode:
authorFlorian Bruhin <me@the-compiler.org>2020-07-10 18:56:20 +0200
committerFlorian Bruhin <me@the-compiler.org>2020-07-10 18:56:20 +0200
commit16e0bc8fe54fd1f57aeaa656bdf50386e049d9bf (patch)
tree3fbc2ede4f88ee401080ab8e3459cf1d19dcdd02 /tests/conftest.py
parentf2f0a3d30bb3949c27413c635bcb08846e362df1 (diff)
downloadqutebrowser-16e0bc8fe54fd1f57aeaa656bdf50386e049d9bf.tar.gz
qutebrowser-16e0bc8fe54fd1f57aeaa656bdf50386e049d9bf.zip
tests: Add GitHub Actions group markers for benchmark results
Diffstat (limited to 'tests/conftest.py')
-rw-r--r--tests/conftest.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/conftest.py b/tests/conftest.py
index 356245929..7afa6ee6a 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -310,3 +310,14 @@ def pytest_runtest_makereport(item, call):
outcome = yield
rep = outcome.get_result()
setattr(item, "rep_" + rep.when, rep)
+
+
+@pytest.hookimpl(hookwrapper=True)
+def pytest_terminal_summary(terminalreporter):
+ """Group benchmark results on CI."""
+ if testutils.ON_CI:
+ terminalreporter.write_line("::group::Benchmark results")
+ yield
+ terminalreporter.write_line("::endgroup")
+ else:
+ yield