Skip to content

Commit

Permalink
Add tox support for test and verification
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicoretti committed Oct 6, 2021
1 parent 90acae7 commit cfc6eb6
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 26 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.idea
.tox
venv/
__pycache__/*
venv/
docs/_build/*
.coverage
*.egg-info/
Expand Down
27 changes: 13 additions & 14 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
language:
- python
os:
- linux
python:
- '3.7'
- '3.8'
- python
jobs:
include:
- python: '3.7'
env: PYENV=py37
os: linux
- python: '3.8'
env: PYENV=py38
os: linux
install:
- pip install --upgrade pip
- pip install setuptools
- pip install --upgrade setuptools
- pip install coveralls
- pip install -e .
- pip list
- pip install --upgrade pip
- pip install -r test-requirements.txt
- pip install --upgrade setuptools
script:
- python setup.py test
- coverage run --source="crc" setup.py test
- tox -e $PYENV
after_success: coveralls
deploy:
provider: pypi
Expand Down
14 changes: 4 additions & 10 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,13 @@ os: Windows Server 2012

environment:
matrix:
- python_version: "C:\\Python37"
- python_version: "C:\\Python37-x64"
- python_version: "C:\\Python38"
- python_version: "C:\\Python38-x64"
- TOXENV: py37
- TOXENV: py38

install:
- "SET PATH=%python_version%;%python_version%\\Scripts;%PATH%"
- "pip install setuptools"
- "pip install --upgrade setuptools"
- "pip install -e ."
- "pip list"
- C:\Python37\python -m pip install -U -r test-requirements.txt

test_script:
- "python setup.py test"
- C:\Python37\scripts\tox

build: off
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ def readme():
classifiers=[
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
],
url='https://github.com/Nicoretti/crc',
license='BSD',
Expand Down
3 changes: 3 additions & 0 deletions test-requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
setuptools
coveralls
tox
10 changes: 10 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[tox]
envlist = py{37, 38, 39}

[testenv]
deps =
-rtest-requirements.txt

commands =
{envpython} setup.py test
coverage run --source="crc" setup.py test

0 comments on commit cfc6eb6

Please sign in to comment.