summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Bruhin <me@the-compiler.org>2020-07-20 16:49:32 +0200
committerFlorian Bruhin <me@the-compiler.org>2020-07-20 16:49:32 +0200
commitecac1503cd5b5faacb2eee0f3fc558fd5baedc9f (patch)
treeb1a8cad7c69a6af40e28e7079db541c86b56ae6a
parent5082331d46a26f03e2adeecf94d4a61b6392a980 (diff)
downloadqutebrowser-ecac1503cd5b5faacb2eee0f3fc558fd5baedc9f.tar.gz
qutebrowser-ecac1503cd5b5faacb2eee0f3fc558fd5baedc9f.zip
ci: Show GitHub Actions markers in check_coverage
-rw-r--r--scripts/dev/check_coverage.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/scripts/dev/check_coverage.py b/scripts/dev/check_coverage.py
index 8bd63f44a..12963de38 100644
--- a/scripts/dev/check_coverage.py
+++ b/scripts/dev/check_coverage.py
@@ -45,6 +45,13 @@ class Message:
filename = attr.ib()
text = attr.ib()
+ def show(self):
+ """Print this message."""
+ if scriptutils.ON_CI:
+ scriptutils.gha_error(self.text)
+ else:
+ print(self.text)
+
MsgType = enum.Enum('MsgType', 'insufficient_coverage, perfect_file')
@@ -311,7 +318,7 @@ def main_check():
print()
scriptutils.print_title("Coverage check failed")
for msg in messages:
- print(msg.text)
+ msg.show()
print()
filters = ','.join('qutebrowser/' + msg.filename for msg in messages)
subprocess.run([sys.executable, '-m', 'coverage', 'report',