mirror of
https://github.com/ansible/awx.git
synced 2026-01-27 16:41:29 -03:30
Additional travis/tox tweaks
* Enable travis caching * Disable coverage after_build * Call setup.py develop first * Include pytest config and enable skipsdist
This commit is contained in:
parent
5c516b60b3
commit
6140c8c500
10
.travis.yml
10
.travis.yml
@ -11,8 +11,8 @@ install:
|
||||
- pip install tox
|
||||
script:
|
||||
- tox
|
||||
after_success:
|
||||
- TOXENV=coveralls tox
|
||||
# after_success:
|
||||
# - TOXENV=coveralls tox
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
@ -20,4 +20,8 @@ addons:
|
||||
- libxmlsec1-dev
|
||||
- postgresql-9.5
|
||||
- libssl-dev
|
||||
|
||||
cache:
|
||||
pip: true
|
||||
directories:
|
||||
- node_modules
|
||||
- .tox
|
||||
|
||||
@ -3,7 +3,7 @@ DJANGO_SETTINGS_MODULE = awx.settings.development
|
||||
python_paths = venv/tower/lib/python2.7/site-packages
|
||||
site_dirs = venv/tower/lib/python2.7/site-packages
|
||||
python_files = *.py
|
||||
addopts = --reuse-db --nomigrations
|
||||
addopts = --reuse-db --nomigrations --tb=native
|
||||
markers =
|
||||
ac: access control test
|
||||
license_feature: ensure license features are accessible or not depending on license
|
||||
|
||||
39
tox.ini
39
tox.ini
@ -1,4 +1,5 @@
|
||||
[tox]
|
||||
skipsdist = true
|
||||
envlist =
|
||||
api-lint,
|
||||
ui-lint,
|
||||
@ -11,30 +12,46 @@ basepython = python2.7
|
||||
setenv =
|
||||
DJANGO_SETTINGS_MODULE = awx.settings.development_quiet
|
||||
# For OS X to be able to install pycrypto.
|
||||
CFLAGS = -I/opt/local/include
|
||||
# CFLAGS = -I/opt/local/include
|
||||
SWIG_FEATURES = -cpperraswarn -includeall -I/usr/include/openssl
|
||||
HOME = {homedir}
|
||||
USERPROFILE = {homedir}
|
||||
ANSIBLE_USE_VENV = True
|
||||
ANSIBLE_VENV_PATH = {toxworkdir}
|
||||
TOWER_USE_VENV = True
|
||||
TOWER_VENV_PATH = {toxworkdir}
|
||||
SKIP_SLOW_TESTS = True
|
||||
|
||||
[testenv:api-lint]
|
||||
deps =
|
||||
-r{toxinidir}/requirements/requirements.txt
|
||||
-r{toxinidir}/requirements/requirements_dev.txt
|
||||
coverage
|
||||
coveralls
|
||||
nodeenv
|
||||
|
||||
[testenv:api-lint]
|
||||
commands =
|
||||
make flake8
|
||||
coverage erase
|
||||
|
||||
[testenv:ui-lint]
|
||||
deps =
|
||||
nodeenv
|
||||
commands =
|
||||
make jshint
|
||||
|
||||
[testenv:api]
|
||||
deps =
|
||||
-r{toxinidir}/requirements/requirements.txt
|
||||
-r{toxinidir}/requirements/requirements_dev.txt
|
||||
coverage
|
||||
coveralls
|
||||
commands =
|
||||
coverage run --parallel -m pytest --create-db --source awx/main/tests {posargs}
|
||||
python setup.py develop
|
||||
# coverage run --help
|
||||
# coverage run -p --source awx/main/tests -m pytest {posargs}
|
||||
py.test awx/main/tests {posargs}
|
||||
|
||||
[testenv:ui]
|
||||
deps =
|
||||
nodeenv
|
||||
commands =
|
||||
make UI_TEST_MODE=CI test-ui
|
||||
|
||||
@ -44,3 +61,13 @@ commands=
|
||||
coverage report -m
|
||||
coveralls
|
||||
|
||||
[pytest]
|
||||
DJANGO_SETTINGS_MODULE = awx.settings.development
|
||||
python_paths = venv/tower/lib/python2.7/site-packages
|
||||
site_dirs = venv/tower/lib/python2.7/site-packages
|
||||
python_files = *.py
|
||||
addopts = --reuse-db --nomigrations --tb=native
|
||||
markers =
|
||||
ac: access control test
|
||||
license_feature: ensure license features are accessible or not depending on license
|
||||
mongo_db: drop mongodb test database before test runs
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user