forked from OCA/pylint-odoo
-
Notifications
You must be signed in to change notification settings - Fork 4
/
tox.ini
39 lines (35 loc) · 1.29 KB
/
tox.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
[tox]
envlist = clean, pylint, profile-stats
skip_missing_interpreters = true
[testenv]
deps = -r{toxinidir}/requirements.txt
# Test deps
coveralls
nodeenv
setenv =
PYLINT_ODOO_STATS = {toxinidir}/.cprofile_{envname}
passenv =
*
commands =
python --version
# node 18 is not compatible with current ubuntu version used in travis
# More info about:
# - https://travis-ci.community/t/the-command-npm-config-set-spin-false-failed-and-exited-with-1-during/12909/4
nodeenv --python-virtualenv -n 17.9.0
npm install -g --no-package-lock --no-save eslint
eslint --version
coverage run setup.py test
coverage report -m
[testenv:profile-stats]
deps =
pstats_print2list
skip_install = true
commands =
python -c "from glob import glob;from pstats_print2list.pstats_print2list import get_pstats_print2list,print_pstats_list;fnames=glob('{toxinidir}/.cprofile_*.stats');print_pstats_list(get_pstats_print2list(fnames, sort='cumulative', filter_fnames=['pylint_odoo'], limit=15));print_pstats_list(get_pstats_print2list(fnames, sort='calls', filter_fnames=['pylint_odoo'], limit=15))"
[testenv:clean]
deps =
coverage
skip_install = true
commands =
coverage erase
python -c "import os;from glob import glob;map(os.remove, glob('{toxinidir}/.cprofile_*.stats'))"