Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add github actions for running tests #14

Merged
merged 7 commits into from
Mar 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
[run]
source = nti.app.pyramid_zope
# New in 5.0; required for the GHA coveralls submission.
# Perhaps this obsoletes the source section in [paths]?
relative_files = True

[report]
exclude_lines =
pragma: no cover
raise NotImplementedError
if __name__ == .__main__.:
if __name__ == .__main__.:
52 changes: 52 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: tests

on: [push, pull_request]

env:
PYTHONHASHSEED: 1042466059


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-${{ hashFiles('setup.*') }}
restore-keys: |
${{ runner.os }}-pip-
- 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
jamadden marked this conversation as resolved.
Show resolved Hide resolved
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
34 changes: 0 additions & 34 deletions .travis.yml

This file was deleted.

4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
nti.app.pyramid_zope
======================

.. image:: https://travis-ci.org/NextThought/nti.app.pyramid_zope.svg?branch=master
:target: https://travis-ci.org/NextThought/nti.app.pyramid_zope
.. image:: https://github.com/NextThought/nti.app.pyramid_zope/workflows/tests/badge.svg
:target: https://github.com/NextThought/nti.app.pyramid_zope/actions?query=workflow%3Atests

.. image:: https://coveralls.io/repos/github/NextThought/nti.app.pyramid_zope/badge.svg?branch=master
:target: https://coveralls.io/github/NextThought/nti.app.pyramid_zope?branch=master
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,6 @@
'pull request #')}

autodoc_default_options = {
'members': True,
'members': None,
'show-inheritance': True,
}
7 changes: 4 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
}

TESTS_REQUIRE = [
'coverage',
'fudge',
'nti.testing',
'zope.testrunner',
Expand Down Expand Up @@ -61,7 +62,7 @@ def _read(fname):
'PyYAML',
'nti.property',
'nti.traversal',
'pyramid',
'pyramid < 2.0',
'pyramid-chameleon',
'setuptools',
'simplejson',
Expand All @@ -88,10 +89,10 @@ def _read(fname):
extras_require={
'test': TESTS_REQUIRE,
'docs': [
'Sphinx >= 2.1.2',
'Sphinx',
'repoze.sphinx.autointerface',
'sphinx_rtd_theme',
],
] + TESTS_REQUIRE,
},
entry_points=entry_points,
)