Skip to content

ci: Test with tox command #15

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

Merged
merged 1 commit into from
Aug 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
4 changes: 2 additions & 2 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8==3.8.4 pytest
pip install flake8==3.8.4 pytest tox
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with flake8
run: |
python setup.py lint
- name: Test with pytest
run: |
python setup.py test
tox
14 changes: 0 additions & 14 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,6 @@
from setuptools.command.test import test as TestCommand, Command


class PyTest(TestCommand):
def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = ["tests", "-s"]
self.test_suite = True

def run_tests(self):
import pytest

errno = pytest.main(self.test_args)
raise SystemExit(errno)


class LintCommand(Command):
"""
A copy of flake8's Flake8Command
Expand Down Expand Up @@ -96,7 +83,6 @@ def requirements():
"pytest>=6.2,<7",
],
cmdclass={
"test": PyTest,
"lint": LintCommand,
},
)
6 changes: 6 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[tox]
envlist = python3.9

[testenv]
deps = pytest
commands = pytest tests -s