Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In CI builds, show a diff of changed --help output if README.rst is outdated. #511

Merged
merged 1 commit into from
Mar 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 1 addition & 13 deletions .github/workflows/help-in-readme.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,4 @@ jobs:
- uses: actions/checkout@v4
- run: pip install '.[flynt,isort]'
- name: Verify that README contains output of darker --help
shell: python
run: |
import sys
from pathlib import Path
from pprint import pprint
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()
if usage in readme:
sys.exit(0)
pprint(str.splitlines(usage, keepends=True), width=94)
sys.exit(1)
run: darker --verify-readme
1 change: 1 addition & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ Added
This makes the option compatible with Black.
- Upgrade NixOS tests to use Python 3.11 on both Linux and macOS.
- Move ``git_repo`` fixture to ``darkgraylib``.
- In CI builds, show a diff of changed ``--help`` output if ``README.rst`` is outdated.

Fixed
-----
Expand Down
Loading