Skip to content

Commit

Permalink
Github actions to use tox for tests (#117)
Browse files Browse the repository at this point in the history
* Revive tox.ini

* Test using tox w/ GH actions

* Cleanup

* Update MANIFEST.in

* Bump version
  • Loading branch information
wswld authored Feb 26, 2024
1 parent b7cfa04 commit 5b4fec6
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 23 deletions.
12 changes: 2 additions & 10 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,11 @@ on:

jobs:
build:

runs-on: ubuntu-20.04
timeout-minutes: 5
strategy:
matrix:
python-version: [3.6, 3.7, 3.8, 3.9, '3.10']

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
Expand All @@ -27,14 +25,8 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox tox-gh-actions
pip install -r requirements/test.txt
- name: Lint with flake8
run: |
flake8 ddt.py test
# # stop the build if there are Python syntax errors or undefined names
# flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
# flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
pytest
tox
4 changes: 4 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
include *.md
recursive-include test *.py *.json *.yaml
include MANIFEST.in
include LICENSE.md
include tox.ini
global-exclude *.py[cod] __pycache__
2 changes: 1 addition & 1 deletion ddt.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
from collections.abc import Sequence


__version__ = '1.7.1'
__version__ = '1.7.2'

# These attributes will not conflict with any real python attribute
# They are added to the decorated test method and processed later
Expand Down
22 changes: 10 additions & 12 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py27, py35
envlist = py36,py37,py38,py39,py310

[testenv]
deps =
Expand All @@ -14,18 +14,16 @@ commands =
pytest --cov=ddt --cov-report html
flake8 ddt.py test

[testenv:py27]
deps =
{[testenv]deps}
mock
Sphinx
sphinxcontrib-programoutput
commands =
pytest --cov=ddt --cov-report html
flake8 ddt.py test
sphinx-build -b html docs docs/_build

[flake8]
max-line-length = 127
exclude = .git,__pycache__,docs/source/conf.py,old,build,dist,.tox,.venv
max-complexity = 10

[gh-actions]
python =
3.8: py38
3.6: py36
3.7: py37
3.8: py38
3.9: py39
3.10: py310

0 comments on commit 5b4fec6

Please sign in to comment.