diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 000000000..83808f62f --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,44 @@ +--- + +name: Tests + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + build_ubuntu: + strategy: + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + name: ${{ matrix.os }} + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + with: + python-version: "3.7" + - uses: actions/setup-python@v2 + with: + python-version: "3.8" + - uses: actions/setup-python@v2 + with: + python-version: "3.9" + - uses: actions/setup-python@v2 + with: + python-version: "3.10" + - uses: actions/cache@v2 + with: + path: ~/.cache/ + key: ${{ matrix.os }} + - name: setup + run: | + python -m pip install --upgrade pip + python -m pip install --upgrade pytest + - name: run tests + run: | + python -m pytest diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 000000000..9787c3bdf --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["setuptools", "wheel"] +build-backend = "setuptools.build_meta" diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 000000000..bda29cee4 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,24 @@ +[metadata] +name = sphinx-lint +version = attr: sphinxlint.__version__ +description = Check for stylistic and formal issues in .rst and .py files included in the documentation. +long_description = file: README.md +long_description_content_type = text/markdown; charset=UTF-8 +author = Julien Palard +author_email = julien@palard.fr +url = https://github.com/sphinx-contrib/sphinx-lint +license = MIT License +classifiers = + Development Status :: 5 - Production/Stable + Topic :: Documentation :: Sphinx + Intended Audience :: Developers + License :: OSI Approved :: Python Software Foundation License + Natural Language :: English + Programming Language :: Python :: 3 + +[options] +py_modules = sphinxlint +python_requires = >= 3.7 + +[options.entry_points] +console_scripts = sphinx-lint=sphinxlint:main diff --git a/sphinxlint.py b/sphinxlint.py index f8b217623..967614c36 100755 --- a/sphinxlint.py +++ b/sphinxlint.py @@ -12,6 +12,8 @@ """Sphinx rst linter. """ +__version__ = "0.1" + import os import re import sys