mirror of
https://github.com/ZwareBear/awx.git
synced 2026-03-20 07:43:35 -05:00
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:
10
.travis.yml
10
.travis.yml
@@ -11,8 +11,8 @@ install:
|
|||||||
- pip install tox
|
- pip install tox
|
||||||
script:
|
script:
|
||||||
- tox
|
- tox
|
||||||
after_success:
|
# after_success:
|
||||||
- TOXENV=coveralls tox
|
# - TOXENV=coveralls tox
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
packages:
|
packages:
|
||||||
@@ -20,4 +20,8 @@ addons:
|
|||||||
- libxmlsec1-dev
|
- libxmlsec1-dev
|
||||||
- postgresql-9.5
|
- postgresql-9.5
|
||||||
- libssl-dev
|
- 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
|
python_paths = venv/tower/lib/python2.7/site-packages
|
||||||
site_dirs = venv/tower/lib/python2.7/site-packages
|
site_dirs = venv/tower/lib/python2.7/site-packages
|
||||||
python_files = *.py
|
python_files = *.py
|
||||||
addopts = --reuse-db --nomigrations
|
addopts = --reuse-db --nomigrations --tb=native
|
||||||
markers =
|
markers =
|
||||||
ac: access control test
|
ac: access control test
|
||||||
license_feature: ensure license features are accessible or not depending on license
|
license_feature: ensure license features are accessible or not depending on license
|
||||||
|
|||||||
39
tox.ini
39
tox.ini
@@ -1,4 +1,5 @@
|
|||||||
[tox]
|
[tox]
|
||||||
|
skipsdist = true
|
||||||
envlist =
|
envlist =
|
||||||
api-lint,
|
api-lint,
|
||||||
ui-lint,
|
ui-lint,
|
||||||
@@ -11,30 +12,46 @@ basepython = python2.7
|
|||||||
setenv =
|
setenv =
|
||||||
DJANGO_SETTINGS_MODULE = awx.settings.development_quiet
|
DJANGO_SETTINGS_MODULE = awx.settings.development_quiet
|
||||||
# For OS X to be able to install pycrypto.
|
# 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}
|
HOME = {homedir}
|
||||||
USERPROFILE = {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 =
|
deps =
|
||||||
-r{toxinidir}/requirements/requirements.txt
|
-r{toxinidir}/requirements/requirements.txt
|
||||||
-r{toxinidir}/requirements/requirements_dev.txt
|
-r{toxinidir}/requirements/requirements_dev.txt
|
||||||
coverage
|
coverage
|
||||||
coveralls
|
coveralls
|
||||||
nodeenv
|
|
||||||
|
|
||||||
[testenv:api-lint]
|
|
||||||
commands =
|
commands =
|
||||||
make flake8
|
make flake8
|
||||||
coverage erase
|
|
||||||
|
|
||||||
[testenv:ui-lint]
|
[testenv:ui-lint]
|
||||||
|
deps =
|
||||||
|
nodeenv
|
||||||
commands =
|
commands =
|
||||||
make jshint
|
make jshint
|
||||||
|
|
||||||
[testenv:api]
|
[testenv:api]
|
||||||
|
deps =
|
||||||
|
-r{toxinidir}/requirements/requirements.txt
|
||||||
|
-r{toxinidir}/requirements/requirements_dev.txt
|
||||||
|
coverage
|
||||||
|
coveralls
|
||||||
commands =
|
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]
|
[testenv:ui]
|
||||||
|
deps =
|
||||||
|
nodeenv
|
||||||
commands =
|
commands =
|
||||||
make UI_TEST_MODE=CI test-ui
|
make UI_TEST_MODE=CI test-ui
|
||||||
|
|
||||||
@@ -44,3 +61,13 @@ commands=
|
|||||||
coverage report -m
|
coverage report -m
|
||||||
coveralls
|
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
|
||||||
|
|||||||
Reference in New Issue
Block a user