From dddae720fe6ac2f7838ea60e0817ccb1270146e4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 25 Aug 2024 13:16:07 -0400 Subject: [PATCH] Add badge for GitHub workflows. --- discovery.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/discovery.py b/discovery.py index fe96adb..f2f065d 100644 --- a/discovery.py +++ b/discovery.py @@ -260,6 +260,7 @@ def render_badges(type): _, _, subtype = type.partition('/') rb = functools.partial(render_badge, subtype.replace('x-', '')) PROJECT = best_name() + URL = source_url() yield rb( image=f'https://img.shields.io/pypi/v/{PROJECT}', target=f'https://pypi.org/project/{PROJECT}', @@ -267,6 +268,11 @@ def render_badges(type): yield rb(image=f'https://img.shields.io/pypi/pyversions/{PROJECT}') + yield rb( + image=f'{URL}/actions/workflows/main.yml/badge.svg', + target=f'{URL}/actions?query=workflow%3A%22tests%22', + ) + system = urllib.parse.quote('coherent system') yield rb( image=f'https://img.shields.io/badge/{system}-informational',