diff --git a/.github/workflows/pypi-release.yml b/.github/workflows/pypi-release.yml index 4392d7f9..f9839aad 100644 --- a/.github/workflows/pypi-release.yml +++ b/.github/workflows/pypi-release.yml @@ -26,15 +26,38 @@ jobs: name: python-package-distributions path: dist/ + + test-pypi-package: + name: Test the built 📦 package works basically. + runs-on: ubuntu-latest + needs: + - build + steps: + - name: Download all the dists + uses: actions/download-artifact@v3 + with: + name: python-package-distributions + path: dist/ + - name: Test that the basic pip built package runs without error + run: | + set -e + pip3 install dist/changedetection.io*.whl + changedetection.io -d /tmp -p 10000 & + sleep 3 + curl http://127.0.0.1:10000/static/styles/pure-min.css >/dev/null + curl http://127.0.0.1:10000/ >/dev/null + killall changedetection.io + + publish-to-pypi: name: >- Publish Python 🐍 distribution 📦 to PyPI if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes needs: - - build + - test-pypi-package runs-on: ubuntu-latest environment: - name: pypi + name: release url: https://pypi.org/p/changedetection.io permissions: id-token: write # IMPORTANT: mandatory for trusted publishing diff --git a/.github/workflows/test-pip-build.yml b/.github/workflows/test-pip-build.yml deleted file mode 100644 index e5e0bd30..00000000 --- a/.github/workflows/test-pip-build.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: ChangeDetection.io PIP package test - -# Triggers the workflow on push or pull request events - -# This line doesnt work, even tho it is the documented one -on: [push, pull_request] - - # Changes to requirements.txt packages and Dockerfile may or may not always be compatible with arm etc, so worth testing - # @todo: some kind of path filter for requirements.txt and Dockerfile -jobs: - test-pip-build-basics: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: Set up Python 3.11 - uses: actions/setup-python@v4 - with: - python-version: 3.11 - - - - name: Test that the basic pip built package runs without error - run: | - set -e - mkdir dist - pip3 install wheel - python3 setup.py bdist_wheel - pip3 install -r requirements.txt - rm ./changedetection.py - rm -rf changedetectio - - pip3 install dist/changedetection.io*.whl - changedetection.io -d /tmp -p 10000 & - sleep 3 - curl http://127.0.0.1:10000/static/styles/pure-min.css >/dev/null - killall -9 changedetection.io diff --git a/MANIFEST.in b/MANIFEST.in index f7393309..b06768fc 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -10,6 +10,8 @@ prune changedetectionio/static/package-lock.json prune changedetectionio/static/styles/node_modules prune changedetectionio/static/styles/package-lock.json include changedetection.py +include requirements.txt +include README-pip.md global-exclude *.pyc global-exclude node_modules global-exclude venv diff --git a/setup.py b/setup.py index bad23d9f..4767e845 100644 --- a/setup.py +++ b/setup.py @@ -27,7 +27,7 @@ install_requires = open('requirements.txt').readlines() setup( name='changedetection.io', version=find_version("changedetectionio", "__init__.py"), - description='Website change detection and monitoring service', + description='Website change detection and monitoring service, detect changes to web pages and send alerts/notifications.', long_description=open('README-pip.md').read(), long_description_content_type='text/markdown', keywords='website change monitor for changes notification change detection ' @@ -41,7 +41,7 @@ setup( include_package_data=True, install_requires=install_requires, license="Apache License 2.0", - python_requires=">= 3.7", + python_requires=">= 3.10", classifiers=['Intended Audience :: Customer Service', 'Intended Audience :: Developers', 'Intended Audience :: Education',