Skip to content
This repository has been archived by the owner on Feb 17, 2023. It is now read-only.

Commit

Permalink
Configuring for pure-python
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Howitz committed Nov 18, 2020
1 parent f81795d commit a785a6c
Show file tree
Hide file tree
Showing 8 changed files with 72 additions and 44 deletions.
2 changes: 1 addition & 1 deletion .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
Expand Down
54 changes: 54 additions & 0 deletions .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 }}
2 changes: 1 addition & 1 deletion .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
Expand Down
7 changes: 4 additions & 3 deletions .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

32 changes: 0 additions & 32 deletions .travis.yml

This file was deleted.

8 changes: 5 additions & 3 deletions 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
Expand Down
3 changes: 1 addition & 2 deletions 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

Expand All @@ -10,4 +10,3 @@ doctests = 1
ignore =
.editorconfig
.meta.cfg
.travis.yml
8 changes: 6 additions & 2 deletions 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,
Expand All @@ -28,7 +29,7 @@ deps =
commands =
flake8 src setup.py
check-manifest
check-python-versions .
check-python-versions

[testenv:coverage]
basepython = python3
Expand All @@ -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

0 comments on commit a785a6c

Please sign in to comment.