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

Build/tox #264

Merged
merged 4 commits into from Feb 15, 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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 10 additions & 0 deletions README.md
Expand Up @@ -52,5 +52,15 @@ uvicorn app.main:app --reload
python -m pytest --cov-report term-missing --cov=app tests
```

### Running tox
```shell
# Standard tests: 'coverage' and 'flake8'
tox
# Only flake8 tests
tox -e flake8
# Coverage with html reports
tox -e rep
```

## Contributing
View [contributing guidelines](https://github.com/PythonFreeCourse/calendar/blob/master/CONTRIBUTING.md).
1 change: 1 addition & 0 deletions requirements.txt
Expand Up @@ -104,6 +104,7 @@ text-unidecode==1.3
text2emotion==0.0.5
textblob==0.15.3
toml==0.10.2
tox==3.21.4
tqdm==4.56.0
trio==0.18.0
typed-ast==1.4.2
Expand Down
35 changes: 34 additions & 1 deletion tox.ini
@@ -1,6 +1,39 @@
[tox]
skipsdist=True
envlist = cov, flake8

[testenv]
basepython = python3
deps = -rrequirements.txt


[testenv:rep]
commands =
pytest --cov=app --cov-report=html


[testenv:cov]
commands =
pytest --cov=app


[testenv:flake8]
deps = flake8
commands =
flake8 app
flake8 tests


# pytest Configuration
[pytest]
junit_family = xunit2
testpaths = tests
filterwarnings =
ignore:.*'collections'.*'collections.abc'.*:DeprecationWarning
ignore:Task.all_tasks() is deprecated, use asyncio.all_tasks().*:PendingDeprecationWarning

# Flake8 Configuration
[flake8]

# gettext() adds _() to the global namespace. This lets flake recognize it.
builtins =
_,