From cab5ba0b887e16a308399caa1a8c800140834127 Mon Sep 17 00:00:00 2001 From: Jason Madden Date: Thu, 6 May 2021 14:53:56 -0500 Subject: [PATCH] Move to GitHub Actions and add Python 3.9 Also drop 3.5 --- .coveragerc | 2 ++ .github/workflows/tests.yml | 51 +++++++++++++++++++++++++++++++++++++ .travis.yml | 32 ----------------------- CHANGES.rst | 6 +++-- MANIFEST.in | 2 +- README.rst | 4 +-- setup.py | 2 +- tox.ini | 2 +- 8 files changed, 62 insertions(+), 39 deletions(-) create mode 100644 .github/workflows/tests.yml delete mode 100644 .travis.yml diff --git a/.coveragerc b/.coveragerc index 9cb1e2f..2ce21c4 100644 --- a/.coveragerc +++ b/.coveragerc @@ -1,6 +1,8 @@ [run] source = nti.schema omit = src/nti/schema/tests/*benchmark.py +# New in 5.0; required for the GHA coveralls submission. +relative_files = True [report] # Coverage is run on Linux under cPython 2 and 3, diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..3da42f1 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,51 @@ +name: tests + +on: [push, pull_request] + +env: + PYTHONHASHSEED: 1042466059 + ZOPE_INTERFACE_STRICT_IRO: 1 + + +jobs: + test: + strategy: + matrix: + python-version: [2.7, pypy2, pypy3, 3.6, 3.7, 3.8, 3.9] + + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Pip cache + uses: actions/cache@v2 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('setup.*') }} + - name: Install dependencies + run: | + python -m pip install -U pip setuptools wheel + python -m pip install -U coverage + python -m pip install -U -e ".[test,docs]" + - name: Test + run: | + coverage run -m zope.testrunner --test-path=src --auto-color --auto-progress + coverage run -a -m sphinx -b doctest -d docs/_build/doctrees docs docs/_build/doctests + coverage report -i + - name: Submit to Coveralls + # This is a container action, which only runs on Linux. + uses: AndreMiras/coveralls-python-action@develop + with: + parallel: true + + coveralls_finish: + needs: test + runs-on: ubuntu-latest + steps: + - name: Coveralls Finished + uses: AndreMiras/coveralls-python-action@develop + with: + parallel-finished: true diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index fbdee62..0000000 --- a/.travis.yml +++ /dev/null @@ -1,32 +0,0 @@ -language: python -sudo: false -group: travis_latest -python: - - 2.7 - - 3.6 - - 3.7 - - 3.8 - - pypy - - pypy3 - -env: - global: - ZOPE_INTERFACE_STRICT_IRO: 1 - -script: - - coverage run -m zope.testrunner --test-path=src --auto-color --auto-progress -after_success: - - coveralls -notifications: - email: false - -install: - - pip install -U pip setuptools - - pip install -U coveralls coverage - - pip install -U -e ".[test]" - - -cache: pip - -before_cache: - - rm -f $HOME/.cache/pip/log/debug.log diff --git a/CHANGES.rst b/CHANGES.rst index ed694c0..f053aeb 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,10 +2,12 @@ Changes ========= -1.15.2 (unreleased) +1.16.0 (unreleased) =================== -- Nothing changed yet. +- Add support for Python 3.9. + +- Drop support for Python 3.5. 1.15.1 (2020-07-02) diff --git a/MANIFEST.in b/MANIFEST.in index dc70cc5..3df465b 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -5,7 +5,6 @@ include LICENSE include babel.cfg include nose2.cfg include tox.ini -include .travis.yml include .coveragerc include .isort.cfg @@ -19,3 +18,4 @@ recursive-include docs *.rst recursive-include docs Makefile recursive-exclude docs changelog.rst recursive-include benchmarks *.py +recursive-include .github *.yml diff --git a/README.rst b/README.rst index ec164c5..d7408d4 100644 --- a/README.rst +++ b/README.rst @@ -10,8 +10,8 @@ :target: https://pypi.org/project/nti.schema/ :alt: Supported Python versions -.. image:: https://travis-ci.org/NextThought/nti.schema.svg?branch=master - :target: https://travis-ci.org/NextThought/nti.schema +.. image:: https://github.com/NextThought/nti.zope_catalog/workflows/tests/badge.svg + :target: https://github.com/NextThought/nti.zope_catalog/actions?query=workflow%3Atests .. image:: https://coveralls.io/repos/github/NextThought/nti.schema/badge.svg :target: https://coveralls.io/github/NextThought/nti.schema diff --git a/setup.py b/setup.py index c7c1989..d98c3e4 100644 --- a/setup.py +++ b/setup.py @@ -36,10 +36,10 @@ def _read(fname): 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - '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 :: Implementation :: CPython', 'Programming Language :: Python :: Implementation :: PyPy', 'Framework :: Zope3', diff --git a/tox.ini b/tox.ini index c1275fd..60d7158 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = pypy,py27,py35,py36,pypy3,py37,py38,coverage,docs +envlist = pypy,py27,py36,pypy3,py37,py38,py39,coverage,docs [testenv] deps =