Skip to content

Commit

Permalink
Fix tests due to repoze.sphinx.autointerface problems (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Howitz committed May 11, 2021
1 parent bd29a26 commit 4404adf
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 11 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,17 @@ name: tests

on:
push:
branches: [ master ]
pull_request:
schedule:
- cron: '0 12 * * 0' # run once a week on Sunday
# Allow to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
build:
strategy:
# We want to see all failures:
fail-fast: false
matrix:
config:
# [Python version, tox env]
Expand All @@ -32,7 +35,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2.1.4
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.config[0] }}
- name: Pip cache
Expand Down
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,20 @@
.installed.cfg
.mr.developer.cfg
.tox/
.vscode/
__pycache__/
bin/
build/
coverage.xml
develop-eggs/
develop/
dist/
docs/_build
eggs/
htmlcov/
etc/
lib/
lib64
log/
parts/
pyvenv.cfg
var/
10 changes: 9 additions & 1 deletion .meta.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# https://github.com/zopefoundation/meta/tree/master/config/pure-python
[meta]
template = "pure-python"
commit-id = "4e9825189b9b8d18f28e7dbc63373d4baea08602"
commit-id = "b3b903c81546d54b062adf7fafa32e06125f5ba1"

[python]
with-pypy = true
Expand All @@ -13,3 +13,11 @@ with-appveyor = false

[coverage]
fail-under = 100

[tox]
use-flake8 = true

[manifest]
additional-rules = [
"recursive-include src *.rst",
]
4 changes: 0 additions & 4 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,10 @@ include *.txt
include buildout.cfg
include tox.ini

recursive-include docs *.bat
recursive-include docs *.py
recursive-include docs *.rst
recursive-include docs *.txt
recursive-include docs Makefile

recursive-include src *.pt
recursive-include src *.py
recursive-include src *.rst
recursive-include src *.txt
recursive-include src *.zcml
14 changes: 11 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/pure-python
[tox]
minversion = 3.18
envlist =
lint
py27
Expand All @@ -19,7 +20,7 @@ usedevelop = true
deps =
zope.testrunner
commands =
zope-testrunner --test-path=src []
zope-testrunner --test-path=src {posargs:-vc}
extras =
test

Expand All @@ -37,19 +38,26 @@ commands =

[testenv:docs]
basepython = python3
skip_install = false
# Until repoze.sphinx.autointerface supports Sphinx 4.x we cannot use it:
deps = Sphinx < 4
extras =
docs
commands_pre =
commands =
sphinx-build -b html -d docs/_build/doctrees docs docs/_build/html

[testenv:coverage]
basepython = python3
allowlist_externals =
mkdir
deps =
coverage
coverage-python-version
zope.testrunner
commands =
coverage run -m zope.testrunner --test-path=src []
mkdir -p {toxinidir}/parts/htmlcov
coverage run -m zope.testrunner --test-path=src {posargs:-vc}
coverage html
coverage report -m --fail-under=100

Expand All @@ -70,4 +78,4 @@ exclude_lines =
raise AssertionError

[coverage:html]
directory = htmlcov
directory = parts/htmlcov

0 comments on commit 4404adf

Please sign in to comment.