diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..a526696 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,63 @@ +--- +name: CI + +on: + push: + branches: [main] + pull_request: + branches: [main] + workflow_dispatch: + +env: + FORCE_COLOR: "1" # Make tools pretty. + PIP_DISABLE_PIP_VERSION_CHECK: "1" + PIP_NO_PYTHON_VERSION_WARNING: "1" + +jobs: + build-package: + name: Build & verify package + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + - uses: hynek/build-and-inspect-python-package@v1 + + tests: + name: tox on ${{ matrix.python-version }} + needs: build-package + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: + - '3.8' + - '3.9' + - '3.10' + - '3.11' + - '3.12' + + steps: + - name: Download pre-built packages + uses: actions/download-artifact@v3 + with: + name: Packages + path: dist + - run: tar xf dist/*.tar.gz --strip-components=1 # needed for config files + + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + allow-prereleases: true + cache: pip + + - name: Install dependencies + run: | + python -VV + python -m site + python -m pip install --upgrade pip setuptools wheel + python -m pip install --upgrade coverage[toml] tox tox-gh-actions + + - name: Run tox targets for ${{ matrix.python-version }} + run: python -m tox diff --git a/MANIFEST.in b/MANIFEST.in deleted file mode 100644 index ab5ea7d..0000000 --- a/MANIFEST.in +++ /dev/null @@ -1,9 +0,0 @@ -include *.txt *.rst *.ini LICENSE .coveragerc docs/Makefile -recursive-include src *.py -recursive-include tests *.py -recursive-include docs *.ico -recursive-include docs *.png -recursive-include docs *.py -recursive-include docs *.rst -recursive-include docs *.txt -prune docs/_build diff --git a/setup.py b/setup.py index a07d753..bd53ecb 100644 --- a/setup.py +++ b/setup.py @@ -74,6 +74,7 @@ def find_meta(meta): maintainer_email=find_meta("email"), keywords=KEYWORDS, long_description=read("README.rst"), + long_description_content_type="text/x-rst", packages=PACKAGES, package_dir={"": "src"}, zip_safe=False, diff --git a/tox.ini b/tox.ini index 802f007..dbd3a6d 100644 --- a/tox.ini +++ b/tox.ini @@ -24,12 +24,6 @@ commands = python -m doctest README.rst -[testenv:manifest] -deps = check-manifest -skip_install = true -commands = check-manifest - - [testenv:readme] deps = readme_renderer skip_install = true @@ -49,3 +43,10 @@ commands = coverage combine coverage report + +[gh-actions] +python = + 3.6: py36 + 3.7: py37, docs + 3.8: py38, lint, manifest + pypy3: pypy3