diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..d0b96be --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,148 @@ +name: CI + +on: + push: + branches: [ master ] + tags: [ "**" ] + pull_request: + branches: [ "**" ] + +defaults: + run: + shell: bash + +jobs: + build: + name: ${{ matrix.task.name}} - ${{ matrix.os.name }} ${{ matrix.python.name }} + runs-on: ${{ matrix.os.runs-on }} + strategy: + fail-fast: false + matrix: + os: + - name: Linux + runs-on: ubuntu-latest + python: + - name: CPython 3.8 + tox: py38 + action: 3.8 + task: + - name: Build + tox: build + + steps: + - uses: actions/checkout@v2 + + - name: Set up ${{ matrix.python.name }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python.action }} + + - name: Install dependencies + run: | + python -m pip install --upgrade pip setuptools wheel + python -m pip install build check-manifest twine + + - uses: twisted/python-info-action@v1 + + - name: Build + run: | + check-manifest --verbose . + + python -m build --sdist --outdir dist/ . + + mkdir empty/ + cd empty + + tar -xvf ../dist/* + cd * + + # build the wheel from the sdist + python -m build --wheel --outdir ../../dist/ . + cd ../../ + + twine check dist/* + + - name: Publish + uses: actions/upload-artifact@v2 + with: + name: dist + path: dist/ + + test: + name: ${{ matrix.task.name}} - ${{ matrix.os.name }} ${{ matrix.python.name }} + runs-on: ${{ matrix.os.runs-on }} + needs: + - build + strategy: + fail-fast: false + matrix: + os: + - name: Linux + runs-on: ubuntu-latest + python: + - name: CPython 3.5 + tox: py35 + action: 3.5 + - name: CPython 3.6 + tox: py36 + action: 3.6 + - name: CPython 3.7 + tox: py37 + action: 3.7 + - name: CPython 3.8 + tox: py38 + action: 3.8 + - name: CPython 3.9 + tox: py39 + action: 3.9 + - name: PyPy 3.6 + tox: pypy36 + action: pypy-3.6 + - name: PyPy 3.7 + tox: pypy37 + action: pypy-3.7 + task: + - name: Test + tox: tests + + steps: + - uses: actions/checkout@v2 + + - name: Download package files + uses: actions/download-artifact@v2 + with: + name: dist + path: dist/ + + - name: Set up ${{ matrix.python.name }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python.action }} + + - name: Install dependencies + run: python -m pip install --upgrade pip setuptools wheel + + - name: Install project + run: | + mkdir empty/ + cd empty/ + pip install ../dist/*.whl + + - uses: twisted/python-info-action@v1 + + - name: Test + run: | + cd empty/ + cp --recursive ../tests . + python -m unittest discover tests/ + + all: + name: All + runs-on: ubuntu-latest + needs: + - build + - test + steps: + - name: This + shell: python + run: import this diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 32624d8..0000000 --- a/.travis.yml +++ /dev/null @@ -1,12 +0,0 @@ -language: python -python: - - "3.5" - - "3.6" - - "3.7" - - "3.8" -install: - - pip3 install -e .[dev] - - pip3 install coveralls -script: - - python3 precommit.py - - coveralls diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..0fb3185 --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,12 @@ +include *.py +include *.rc +include *.rst +include *.txt +include *.yapf +include .isort.cfg +include mypy.ini +include tox.ini +recursive-include docs *.py +recursive-include docs *.rst +recursive-include docs Makefile +recursive-include tests *.py diff --git a/README.rst b/README.rst index fad5341..bd1d7f9 100644 --- a/README.rst +++ b/README.rst @@ -1,7 +1,7 @@ pylddwrap ========= -.. image:: https://travis-ci.com/Parquery/pylddwrap.svg?branch=master - :target: https://travis-ci.com/Parquery/pylddwrap.svg?branch=master +.. image:: https://github.com/Parquery/pylddwrap/actions/workflows/ci.yml/badge.svg?branch=master + :target: https://github.com/Parquery/pylddwrap/actions/workflows/ci.yml?query=branch%3Amaster :alt: Build Status .. image:: https://coveralls.io/repos/github/Parquery/pylddwrap/badge.svg?branch=master diff --git a/setup.py b/setup.py index 4c58205..0fc1eb7 100644 --- a/setup.py +++ b/setup.py @@ -35,10 +35,13 @@ 'Development Status :: 5 - Production/Stable', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', + 'Programming Language :: Python :: Implementation :: CPython', + 'Programming Language :: Python :: Implementation :: PyPy', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8' + 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', ], # yapf: enable license='License :: OSI Approved :: MIT License',