Skip to content

Commit

Permalink
CI workflow to ensure README contains usage text
Browse files Browse the repository at this point in the history
  • Loading branch information
akaihola committed Apr 27, 2022
1 parent 9e60f57 commit 7132a4d
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/help-in-readme.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
name: help-in-readme
on: [push] # yamllint disable-line rule:truthy
jobs:
help-in-readme:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: pip install -e '.[isort]'
- name: Verify that README contains output of darker --help
shell: python
run: |
from pathlib import Path
from subprocess import check_output, STDOUT
cmd = ["darker", "--options-for-readme"]
usage = check_output(cmd, stderr=STDOUT, encoding="utf-8")
readme = Path("README.rst").read_text()
assert usage in readme

0 comments on commit 7132a4d

Please sign in to comment.