Skip to content

Commit

Permalink
Add badge for GitHub workflows.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Aug 25, 2024
1 parent 1b5fa41 commit dddae72
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions discovery.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,13 +260,19 @@ 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}',
)

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',
Expand Down

0 comments on commit dddae72

Please sign in to comment.