mirror of
https://github.com/ansible/awx.git
synced 2026-05-08 09:57:35 -02:30
Merge pull request #3099 from jlaska/tox
Add travis-ci integration using tox
This commit is contained in:
31
.travis.yml
Normal file
31
.travis.yml
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
sudo: false
|
||||||
|
language: python
|
||||||
|
python:
|
||||||
|
- '2.7'
|
||||||
|
env:
|
||||||
|
- TOXENV=api-lint
|
||||||
|
- TOXENV=api
|
||||||
|
- TOXENV=ui-lint
|
||||||
|
- TOXENV=ui
|
||||||
|
install:
|
||||||
|
- pip install tox
|
||||||
|
script:
|
||||||
|
- tox
|
||||||
|
# after_success:
|
||||||
|
# - TOXENV=coveralls tox
|
||||||
|
addons:
|
||||||
|
apt:
|
||||||
|
packages:
|
||||||
|
- swig
|
||||||
|
- libxmlsec1-dev
|
||||||
|
- postgresql-9.5
|
||||||
|
- libssl-dev
|
||||||
|
cache:
|
||||||
|
pip: true
|
||||||
|
directories:
|
||||||
|
- node_modules
|
||||||
|
- .tox
|
||||||
|
services:
|
||||||
|
- mongodb
|
||||||
|
# Enable when we stop using sqlite for API tests
|
||||||
|
# - postgresql
|
||||||
@@ -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
|
||||||
|
|||||||
@@ -28,8 +28,8 @@ django-taggit==0.17.6
|
|||||||
git+https://github.com/matburt/dm.xmlsec.binding.git@master#egg=dm.xmlsec.binding
|
git+https://github.com/matburt/dm.xmlsec.binding.git@master#egg=dm.xmlsec.binding
|
||||||
dogpile.core==0.4.1
|
dogpile.core==0.4.1
|
||||||
funcsigs==0.4
|
funcsigs==0.4
|
||||||
gevent==1.1rc3
|
gevent==1.1
|
||||||
gevent-websocket==0.9.3
|
gevent-websocket==0.9.5
|
||||||
git+https://github.com/chrismeyersfsu/django-jsonfield.git@tower_0.9.12#egg=django-jsonfield
|
git+https://github.com/chrismeyersfsu/django-jsonfield.git@tower_0.9.12#egg=django-jsonfield
|
||||||
git+https://github.com/chrismeyersfsu/django-qsstats-magic.git@tower_0.7.2#egg=django-qsstats-magic
|
git+https://github.com/chrismeyersfsu/django-qsstats-magic.git@tower_0.7.2#egg=django-qsstats-magic
|
||||||
git+https://github.com/umutbozkurt/django-rest-framework-mongoengine.git@5dfa1df79f81765d36c0de31dc1c2f390e42d428#egg=django-rest-framework-mongoengine
|
git+https://github.com/umutbozkurt/django-rest-framework-mongoengine.git@5dfa1df79f81765d36c0de31dc1c2f390e42d428#egg=django-rest-framework-mongoengine
|
||||||
|
|||||||
92
tox.ini
92
tox.ini
@@ -1,50 +1,74 @@
|
|||||||
[tox]
|
[tox]
|
||||||
|
skipsdist = true
|
||||||
envlist =
|
envlist =
|
||||||
py26-dj14, py27-dj14, py26-dj15, py27-dj15, py26-dj16, py27-dj16
|
api-lint,
|
||||||
|
ui-lint,
|
||||||
|
api,
|
||||||
|
ui,
|
||||||
|
coveralls
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
commands = python manage.py test main
|
basepython = python2.7
|
||||||
deps =
|
|
||||||
ansible==1.3.4
|
|
||||||
python-ldap
|
|
||||||
setenv =
|
setenv =
|
||||||
DJANGO_SETTINGS_MODULE = awx.settings.development
|
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
|
||||||
downloadcache = {toxworkdir}/cache
|
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:py26-dj14]
|
[testenv:api-lint]
|
||||||
basepython = python2.6
|
|
||||||
deps =
|
deps =
|
||||||
Django==1.4.10
|
-r{toxinidir}/requirements/requirements.txt
|
||||||
{[testenv]deps}
|
-r{toxinidir}/requirements/requirements_dev.txt
|
||||||
|
coverage
|
||||||
|
coveralls
|
||||||
|
commands =
|
||||||
|
make flake8
|
||||||
|
|
||||||
[testenv:py27-dj14]
|
[testenv:ui-lint]
|
||||||
basepython = python2.7
|
|
||||||
deps =
|
deps =
|
||||||
Django==1.4.10
|
nodeenv
|
||||||
{[testenv]deps}
|
commands =
|
||||||
|
make jshint
|
||||||
|
|
||||||
[testenv:py26-dj15]
|
[testenv:api]
|
||||||
basepython = python2.6
|
|
||||||
deps =
|
deps =
|
||||||
Django==1.5.5
|
-r{toxinidir}/requirements/requirements.txt
|
||||||
{[testenv]deps}
|
-r{toxinidir}/requirements/requirements_dev.txt
|
||||||
|
ansible
|
||||||
|
coverage
|
||||||
|
coveralls
|
||||||
|
commands =
|
||||||
|
python setup.py develop
|
||||||
|
# coverage run --help
|
||||||
|
# coverage run -p --source awx/main/tests -m pytest {posargs}
|
||||||
|
py.test awx/main/tests {posargs:-k 'not old'}
|
||||||
|
|
||||||
[testenv:py27-dj15]
|
[testenv:ui]
|
||||||
basepython = python2.7
|
|
||||||
deps =
|
deps =
|
||||||
Django==1.5.5
|
nodeenv
|
||||||
{[testenv]deps}
|
commands =
|
||||||
|
make UI_TEST_MODE=CI test-ui
|
||||||
|
|
||||||
[testenv:py26-dj16]
|
[testenv:coveralls]
|
||||||
basepython = python2.6
|
commands=
|
||||||
deps =
|
coverage combine
|
||||||
Django==1.6
|
coverage report -m
|
||||||
{[testenv]deps}
|
coveralls
|
||||||
|
|
||||||
[testenv:py27-dj16]
|
[pytest]
|
||||||
basepython = python2.7
|
DJANGO_SETTINGS_MODULE = awx.settings.development
|
||||||
deps =
|
python_paths = venv/tower/lib/python2.7/site-packages
|
||||||
Django==1.6
|
site_dirs = venv/tower/lib/python2.7/site-packages
|
||||||
{[testenv]deps}
|
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