From d412f4ad970a39d7519bf1d6e48978d0aa897b0f Mon Sep 17 00:00:00 2001 From: James Brown Date: Sat, 18 May 2024 15:59:09 -0700 Subject: [PATCH] chore: bump dependencies; add github actions (#29) --- .github/workflows/ci.yml | 23 +++++++++++++++++++++++ .travis.yml | 11 ----------- CHANGES.md | 5 +++++ README.md | 4 ++-- requirements-tests.txt | 6 +++--- setup.py | 8 +++++--- 6 files changed, 38 insertions(+), 19 deletions(-) create mode 100644 .github/workflows/ci.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..0bb78e8 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,23 @@ +name: "Python Tests" +on: + pull_request: + push: + branches: [main, master] +jobs: + test: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] + steps: + - uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements-tests.txt -e . + - name: Run pytest + run: py.test -vs tests/ diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 3a6dad9..0000000 --- a/.travis.yml +++ /dev/null @@ -1,11 +0,0 @@ -language: python -python: - - "2.7" - - "3.5" - - "3.6" - - "3.7" - - "3.8" -install: - - "pip install -r requirements-tests.txt" - - "pip install ." -script: "pytest --cov=muttdown --cov-report=term-missing tests/" diff --git a/CHANGES.md b/CHANGES.md index 87eeb8d..96b5b0a 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,8 @@ +NEXT +==== +- Drop support ofr Python <3.6 +- Switch to github actions for CI + 0.3.5 ===== - Fix some unicode handling (including, hopefully, fixing non-ASCII subject lines for real) diff --git a/README.md b/README.md index 929ed48..8d91a3f 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ muttdown ======== -[![Build Status](https://travis-ci.com/Roguelazer/muttdown.svg?branch=master)](https://travis-ci.com/Roguelazer/muttdown) +[![Build Status](https://github.com/Roguelazer/muttdown/actions/workflows/ci.yml/badge.svg)](https://github.com/Roguelazer/muttdown/actions/workflows/ci.yml) `muttdown` is a sendmail-replacement designed for use with the [mutt][] email client which will transparently compile annotated `text/plain` mail into `text/html` using the [Markdown][] standard. It will recursively walk the MIME tree and compile any `text/plain` or `text/markdown` part which begins with the sigil "!m" into Markdown, which it will insert alongside the original in a multipart/alternative container. @@ -60,7 +60,7 @@ Muttdown can also send its mail using the native `sendmail` if you have that set Installation ------------ -Install muttdown with `pip install muttdown` or by downloading this package and running `python setup.py install`. You will need the [PyYAML][] and [Python-Markdown][] libraries, as specified in `requirements.txt`. This should work with Python 2.7 or Python 3.5+. +Install muttdown with `pip install muttdown` or by downloading this package and running `python setup.py install`. You will need the [PyYAML][] and [Python-Markdown][] libraries, as specified in `requirements.txt`. This should work with Python 3.6+. Usage ----- diff --git a/requirements-tests.txt b/requirements-tests.txt index ab10ff1..c534c3a 100644 --- a/requirements-tests.txt +++ b/requirements-tests.txt @@ -1,3 +1,3 @@ -pytest==4.3.* -pytest-cov==2.6.* -pytest-mock==1.10.* +pytest==8.* +pytest-cov==5.* +pytest-mock==3.* diff --git a/setup.py b/setup.py index f543583..345ee7c 100644 --- a/setup.py +++ b/setup.py @@ -18,7 +18,7 @@ long_description=long_description, long_description_content_type="text/markdown", install_requires=[ - 'Markdown>=3.0', + 'Markdown>=3.0,<4.0', 'PyYAML>=3.0', 'pynliner==0.8.0', 'six', @@ -28,15 +28,17 @@ 'muttdown = muttdown.main:main', ] }, + python_requires='>=3.6', classifiers=[ "Development Status :: 3 - Alpha", "Environment :: Console", "Programming Language :: Python", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", "Intended Audience :: End Users/Desktop", "Operating System :: OS Independent", "License :: OSI Approved :: ISC License (ISCL)",