From a785a6c30625400cf12f5e5bbfaad0bc71177f4f Mon Sep 17 00:00:00 2001 From: Michael Howitz Date: Wed, 18 Nov 2020 14:35:26 +0100 Subject: [PATCH] Configuring for pure-python --- .editorconfig | 2 +- .github/workflows/tests.yml | 54 +++++++++++++++++++++++++++++++++++++ .gitignore | 2 +- .meta.cfg | 7 ++--- .travis.yml | 32 ---------------------- MANIFEST.in | 8 +++--- setup.cfg | 3 +-- tox.ini | 8 ++++-- 8 files changed, 72 insertions(+), 44 deletions(-) create mode 100644 .github/workflows/tests.yml delete mode 100644 .travis.yml diff --git a/.editorconfig b/.editorconfig index cfcdf25..f3e46f5 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,5 +1,5 @@ # Generated from: -# https://github.com/zopefoundation/meta/tree/master/config/pure-python-without-pypy +# https://github.com/zopefoundation/meta/tree/master/config/pure-python # # EditorConfig Configuration file, for more details see: # http://EditorConfig.org diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..7898a16 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,54 @@ +# Generated from: +# https://github.com/zopefoundation/meta/tree/master/config/pure-python +name: tests + +on: + push: + branches: [ master ] + pull_request: + schedule: + - cron: '0 12 * * 0' # run once a week on Sunday + +jobs: + build: + strategy: + matrix: + config: + # [Python version, tox env] + - ["3.8", "lint"] + - ["2.7", "py27"] + - ["3.5", "py35"] + - ["3.6", "py36"] + - ["3.7", "py37"] + - ["3.8", "py38"] + - ["3.9", "py39"] + - ["3.8", "coverage"] + + runs-on: ubuntu-latest + name: ${{ matrix.config[1] }} + steps: + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.config[0] }} + - name: Pip cache + uses: actions/cache@v2 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip-${{ hashFiles('setup.*', 'tox.ini') }} + restore-keys: | + ${{ runner.os }}-pip- + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install tox + - name: Test + run: tox -e ${{ matrix.config[1] }} + - name: Coverage + if: matrix.config[1] == 'coverage' + run: | + pip install coveralls coverage-python-version + coveralls + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.gitignore b/.gitignore index b64b1a7..7bd5e56 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ # Generated from: -# https://github.com/zopefoundation/meta/tree/master/config/pure-python-without-pypy +# https://github.com/zopefoundation/meta/tree/master/config/pure-python *.egg-info/ *.profraw *.pyc diff --git a/.meta.cfg b/.meta.cfg index 398b8b7..27d977d 100644 --- a/.meta.cfg +++ b/.meta.cfg @@ -1,7 +1,8 @@ # Generated from: -# https://github.com/zopefoundation/meta/tree/master/config/pure-python-without-pypy +# https://github.com/zopefoundation/meta/tree/master/config/pure-python [meta] -template = pure-python-without-pypy -commit-id = c870dbdd2ae84f4df9d3b45abe3eee9660d1b37e +template = pure-python +commit-id = bcb6eca09d4fbd3fe4e10cb89942adecee9fee58 fail-under = 98 +with-pypy = False diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 850a378..0000000 --- a/.travis.yml +++ /dev/null @@ -1,32 +0,0 @@ -# Generated from: -# https://github.com/zopefoundation/meta/tree/master/config/pure-python-without-pypy -language: python -python: - - "2.7" - - "3.6" - - "3.7" - - "3.8" - - "3.9" - -matrix: - include: - - name: "lint" - python: 3.7 - env: TOXENV="lint" - - name: "coverage" - python: 3.7 - env: TOXENV="coverage" - after_success: - - coveralls - -install: - - pip install -U pip - - pip install -U tox-travis coveralls - -script: - - tox - -notifications: - email: false - -cache: pip diff --git a/MANIFEST.in b/MANIFEST.in index 06ec34f..8bbe95c 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,18 +1,20 @@ # Generated from: -# https://github.com/zopefoundation/meta/tree/master/config/pure-python-without-pypy +# https://github.com/zopefoundation/meta/tree/master/config/pure-python include *.rst include *.txt include buildout.cfg include tox.ini - -exclude MANIFEST.in +include .coveragerc recursive-include docs *.bat recursive-include docs *.py recursive-include docs *.rst +recursive-include docs *.txt recursive-include docs Makefile +recursive-include src *.gif recursive-include src *.pt +recursive-include src *.py recursive-include src *.rst recursive-include src *.txt recursive-include src *.xml diff --git a/setup.cfg b/setup.cfg index 659defa..0bbfe1c 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ # Generated from: -# https://github.com/zopefoundation/meta/tree/master/config/pure-python-without-pypy +# https://github.com/zopefoundation/meta/tree/master/config/pure-python [bdist_wheel] universal = 1 @@ -10,4 +10,3 @@ doctests = 1 ignore = .editorconfig .meta.cfg - .travis.yml diff --git a/tox.ini b/tox.ini index cb8f880..7406db7 100644 --- a/tox.ini +++ b/tox.ini @@ -1,9 +1,10 @@ # Generated from: -# https://github.com/zopefoundation/meta/tree/master/config/pure-python-without-pypy +# https://github.com/zopefoundation/meta/tree/master/config/pure-python [tox] envlist = lint, py27, + py35, py36, py37, py38, @@ -28,7 +29,7 @@ deps = commands = flake8 src setup.py check-manifest - check-python-versions . + check-python-versions [testenv:coverage] basepython = python3 @@ -49,10 +50,13 @@ source = src [coverage:report] precision = 2 exclude_lines = + pragma: no cover pragma: nocover except ImportError: raise NotImplementedError if __name__ == '__main__': + self.fail + raise AssertionError [coverage:html] directory = htmlcov