-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
unit_tests: github_actions: add tox py3 run
Added github actions run for Python 3.8-3.11 with working test-requirements.txt.
- Loading branch information
Showing
4 changed files
with
52 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[DEFAULT] | ||
test_path=${OS_TEST_PATH:-./coriolis/tests} | ||
top_dir=./ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
coverage | ||
ddt | ||
discover | ||
nose | ||
oslotest | ||
# The order of packages is significant, because pip processes them in the order | ||
# of appearance. Changing the order has an impact on the overall integration | ||
# process, which may cause wedges in the gate later. | ||
|
||
hacking>=6.0.1,<=6.0.1 # Apache-2.0 | ||
coverage!=4.4,>=4.0 # Apache-2.0 | ||
ddt>=1.2.1 # MIT | ||
oslotest>=3.8.0 # Apache-2.0 | ||
stestr>=2.0.0 # Apache-2.0 | ||
|
||
hacking>=0.12.0,<0.13 # Apache-2.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,36 @@ | ||
[tox] | ||
minversion = 2.0 | ||
envlist = py35,py27,pep8 | ||
minversion = 4.0.2 | ||
envlist = py3,pep8,flake8,cover | ||
skipsdist = True | ||
|
||
[testenv] | ||
usedevelop = True | ||
whitelist_externals = rm | ||
install_command = pip install {opts} {packages} | ||
setenv = | ||
VIRTUAL_ENV={envdir} | ||
BRANCH_NAME=master | ||
CLIENT_NAME=coriolis-core | ||
DEFAULT_REPO=git@bitbucket.org:cloudbase | ||
PYTHONWARNINGS=default::DeprecationWarning | ||
deps = -r{toxinidir}/requirements.txt | ||
-r{toxinidir}/test-requirements.txt | ||
commands = | ||
python setup.py test --slowest --testr-args='{posargs}' | ||
rm -f .testrepository/times.dbm | ||
setenv = VIRTUAL_ENV={envdir} | ||
deps = | ||
-r{toxinidir}/test-requirements.txt | ||
-r{toxinidir}/requirements.txt | ||
commands = stestr run --slowest {posargs} | ||
|
||
[testenv:pep8] | ||
commands = flake8 {posargs} | ||
|
||
[testenv:cover] | ||
setenv = | ||
{[testenv]setenv} | ||
PYTHON=coverage run --source coriolis --parallel-mode | ||
commands = | ||
stestr run --no-subunit-trace {posargs} | ||
coverage combine | ||
coverage report --fail-under=82 --skip-covered | ||
coverage html -d cover | ||
coverage xml -o cover/coverage.xml | ||
|
||
[testenv:venv] | ||
commands = {posargs} | ||
|
||
[testenv:cover] | ||
commands = python setup.py test --coverage --testr-args='{posargs}' | ||
|
||
[flake8] | ||
# E123, E125 skipped as they are invalid PEP-8. | ||
# E125 is deliberately excluded. See https://github.com/jcrocholl/pep8/issues/126 | ||
# E251 Skipped due to https://github.com/jcrocholl/pep8/issues/301 | ||
|
||
show-source = True | ||
ignore = E123,E125 | ||
builtins = _ | ||
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build | ||
ignore = E125,E251,W503,W504,E305,E731,E117,W605,F632 | ||
exclude = .venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build,tools |