Speed up test suite via distributed testing (#2196)
* Speed up test suite via distributed testing Since we now run the test suite twice, one with Python 2 and another without, full test runs are getting pretty slow. Let's try to fix that with parallization. Also use verbose mode on CI since more logs is usually better since getting more is quite literally impossible. The main issue we'll face with this is we'll hit https://github.com/pytest-dev/pytest-xdist/issues/620 sometimes (although pretty rarely). I suppose we can test this and see if how bad this bug is for us, and revert if necessary down the line. Also let's have some colours 🎉
This commit is contained in:
parent
d0e06b53b0
commit
4fc1354aeb
@ -3,6 +3,7 @@ omit =
|
||||
src/blib2to3/*
|
||||
tests/data/*
|
||||
*/site-packages/*
|
||||
.tox/*
|
||||
|
||||
[run]
|
||||
relative_files = True
|
||||
|
2
.github/workflows/test.yml
vendored
2
.github/workflows/test.yml
vendored
@ -33,7 +33,7 @@ jobs:
|
||||
|
||||
- name: Unit tests
|
||||
run: |
|
||||
tox -e py
|
||||
tox -e py -- -v --color=yes
|
||||
|
||||
- name: Publish coverage to Coveralls
|
||||
# If pushed / is a pull request against main repo AND
|
||||
|
@ -3,5 +3,7 @@ pre-commit
|
||||
pytest >= 6.1.1
|
||||
pytest-mock >= 3.3.1
|
||||
pytest-cases >= 2.3.0
|
||||
pytest-xdist >= 2.2.1
|
||||
pytest-cov >= 2.11.1
|
||||
parameterized >= 0.7.4
|
||||
tox
|
||||
|
4
tox.ini
4
tox.ini
@ -9,9 +9,9 @@ deps =
|
||||
commands =
|
||||
pip install -e .[d]
|
||||
coverage erase
|
||||
coverage run -m pytest tests --run-optional=no_python2 {posargs}
|
||||
pytest tests --run-optional no_python2 --numprocesses auto --cov {posargs}
|
||||
pip install -e .[d,python2]
|
||||
coverage run -m pytest tests --run-optional=python2 {posargs}
|
||||
pytest tests --run-optional python2 --numprocesses auto --cov --cov-append {posargs}
|
||||
coverage report
|
||||
|
||||
[testenv:fuzz]
|
||||
|
Loading…
Reference in New Issue
Block a user