Skip to content

Commit 6dfbeff

Browse files
author
Hugo Osvaldo Barrera
committed
Use tox for testing and CI
Far simpler. Especially to quickly run tests locally.
1 parent 7e64d74 commit 6dfbeff

File tree

4 files changed

+27
-25
lines changed

4 files changed

+27
-25
lines changed

.github/workflows/tests.yml

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,20 @@ jobs:
99
matrix:
1010
os: [ubuntu-18.04, macOS-10.14]
1111
python: [ '3.5', '3.6', '3.7' ]
12-
extras: [ "", "[images]" ]
13-
name: python${{ matrix.python }} on ${{ matrix.os }} ${{ matrix.extras }}
12+
variant: [ "py", "py-images" ]
13+
name: python${{ matrix.python }} on ${{ matrix.os }} ${{ matrix.variant }}
1414
steps:
15-
- uses: actions/checkout@master
16-
- uses: actions/setup-python@v1
15+
- uses: actions/checkout@v2
16+
- uses: actions/setup-python@v2
1717
with:
1818
python-version: ${{ matrix.python }}
19-
architecture: x64
20-
- name: Install test dependencies
21-
run: |
22-
pip install --upgrade --no-cache-dir pipenv
23-
pipenv install --dev
24-
pipenv install .${{ matrix.extras }}
19+
- name: Install test dependency
20+
run: pip install tox codecov
2521
- name: Run tests
26-
run: pipenv run pytest
22+
run: tox
23+
env:
24+
TOXENV: ${{ matrix.variant }}
2725
- name: Report coverage
28-
run: pipenv run codecov
26+
run: codecov
2927
env:
3028
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

Pipfile

Lines changed: 0 additions & 13 deletions
This file was deleted.

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
"Programming Language :: Python :: 3.5",
2727
"Programming Language :: Python :: 3.6",
2828
"Programming Language :: Python :: 3.7",
29+
"Programming Language :: Python :: 3.8",
2930
"Topic :: Multimedia :: Graphics",
3031
"Topic :: Software Development :: Libraries :: Python Modules",
3132
],

tox.ini

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
[tox]
2+
envlist = {py35,py36,py37,py38}{,-images}
3+
skip_missing_interpreters = True
4+
5+
[testenv]
6+
deps =
7+
pytest
8+
pytest-cov
9+
images: Pillow
10+
commands = pytest --cov barcode
11+
usedevelop = True
12+
13+
[flake8]
14+
exclude=.tox,build,.eggs
15+
application-import-names=barcode,tests
16+
import-order-style=smarkets

0 commit comments

Comments
 (0)