Skip to content

Commit 04fe413

Browse files
authored
Add job to check readme before merge (alisw#946)
Seems like a requirement from pypi. It can make the release fail to publish, so it's better to check early
1 parent aff6017 commit 04fe413

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

.github/workflows/pr-check.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,3 +129,22 @@ jobs:
129129
#
130130
# - name: Run linters
131131
# run: tox -e lint
132+
133+
check-readme:
134+
name: Check README
135+
runs-on: ubuntu-latest
136+
137+
steps:
138+
- uses: actions/checkout@v4
139+
140+
- name: Set up Python
141+
uses: actions/setup-python@v5
142+
with:
143+
python-version: 3.x
144+
145+
- name: Install dependencies
146+
run: python -m pip install --upgrade tox tox-gh-actions
147+
148+
- name: Run README check
149+
run: tox -e check-readme
150+

tox.ini

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,3 +139,11 @@ exclude_lines =
139139
raise NotImplementedError
140140
# Don't complain if non-runnable code isn't run:
141141
if __name__ == .__main__.:
142+
143+
[testenv:check-readme]
144+
# Check the README.rst file for common issues.
145+
# The pypa publishing job fails if this fails.
146+
deps =
147+
rstcheck
148+
commands =
149+
rstcheck {toxinidir}/README.rst

0 commit comments

Comments
 (0)