mirror of https://github.com/pypa/pip
Validate NEWS files with rstcheck.
This commit is contained in:
parent
ab250e3e09
commit
459c1c7e40
|
@ -44,3 +44,17 @@ jobs:
|
||||||
run: >-
|
run: >-
|
||||||
python -m tox
|
python -m tox
|
||||||
env: ${{ matrix.env }}
|
env: ${{ matrix.env }}
|
||||||
|
|
||||||
|
news_format:
|
||||||
|
name: Check NEWS format
|
||||||
|
runs-on: ubuntu-18.04
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@master
|
||||||
|
- name: Set up Python
|
||||||
|
uses: actions/setup-python@v1
|
||||||
|
with:
|
||||||
|
version: 3.7
|
||||||
|
- name: Install nox
|
||||||
|
run: pip install nox
|
||||||
|
- name: Check NEWS format
|
||||||
|
run: nox -s validate_news
|
||||||
|
|
13
noxfile.py
13
noxfile.py
|
@ -1,6 +1,7 @@
|
||||||
"""Release time helpers, executed using nox.
|
"""Release time helpers, executed using nox.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
import glob
|
||||||
import io
|
import io
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
|
@ -30,6 +31,18 @@ def get_author_list():
|
||||||
return sorted(authors, key=lambda x: x.lower())
|
return sorted(authors, key=lambda x: x.lower())
|
||||||
|
|
||||||
|
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
# Ad-hoc commands
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
@nox.session
|
||||||
|
def validate_news(session):
|
||||||
|
session.install("rstcheck")
|
||||||
|
|
||||||
|
news_files = sorted(glob.glob("news/*"))
|
||||||
|
|
||||||
|
session.run("rstcheck", *news_files)
|
||||||
|
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
# Commands used during the release process
|
# Commands used during the release process
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
|
|
|
@ -8,7 +8,7 @@ filename = "NEWS.rst"
|
||||||
directory = "news/"
|
directory = "news/"
|
||||||
title_format = "{version} ({project_date})"
|
title_format = "{version} ({project_date})"
|
||||||
issue_format = "`#{issue} <https://github.com/pypa/pip/issues/{issue}>`_"
|
issue_format = "`#{issue} <https://github.com/pypa/pip/issues/{issue}>`_"
|
||||||
template = "news/_template.rst"
|
template = "tools/automation/news/template.rst"
|
||||||
type = [
|
type = [
|
||||||
{ name = "Process", directory = "process", showcontent = true },
|
{ name = "Process", directory = "process", showcontent = true },
|
||||||
{ name = "Deprecations and Removals", directory = "removal", showcontent = true },
|
{ name = "Deprecations and Removals", directory = "removal", showcontent = true },
|
||||||
|
|
Loading…
Reference in New Issue