Run UI integration tests in Circle CI

This commit is contained in:
Dave Hunt 2016-06-27 09:57:25 +01:00
Родитель fefca816a0
Коммит 6730f9a9f8
3 изменённых файлов: 49 добавлений и 0 удалений

32
circle.yml Normal file
Просмотреть файл

@ -0,0 +1,32 @@
machine:
services:
- docker
dependencies:
override:
- pip install tox mozdownload mozinstall
test:
pre:
- mozdownload --version latest-esr --destination firefox.tar.bz2
- mozinstall firefox.tar.bz2
- docker-compose pull
- docker-compose up -d
- docker-compose run web ./scripts/setup-docker.sh
- sleep 60 # wait for the web application to start
override:
- tox -e ui-tests --
--base-url=http://127.0.0.1
--firefox-path=firefox/firefox
--junit-xml=$CIRCLE_TEST_REPORTS/junit.xml
--html=$CIRCLE_ARTIFACTS/results.html
post:
- docker logs addonsserver_elasticsearch_1 > $CIRCLE_ARTIFACTS/elasticsearch.log
- docker logs addonsserver_memcached_1 > $CIRCLE_ARTIFACTS/memcached.log
- docker logs addonsserver_mysqld_1 > $CIRCLE_ARTIFACTS/mysqld.log
- docker logs addonsserver_nginx_1 > $CIRCLE_ARTIFACTS/nginx.log
- docker logs addonsserver_rabbitmq_1 > $CIRCLE_ARTIFACTS/rabbitmq.log
- docker logs addonsserver_redis_1 > $CIRCLE_ARTIFACTS/redis.log
- docker logs addonsserver_web_1 > $CIRCLE_ARTIFACTS/web.log
- docker logs addonsserver_worker_1 > $CIRCLE_ARTIFACTS/worker.log
- cp logs/* $CIRCLE_ARTIFACTS

16
scripts/setup-docker.sh Executable file
Просмотреть файл

@ -0,0 +1,16 @@
#!/bin/bash
# initialize_db:
python manage.py reset_db --noinput
python manage.py syncdb --noinput
python manage.py loaddata initial.json
python manage.py import_prod_versions
schematic --fake src/olympia/migrations/
#python manage.py createsuperuser
#python manage.py loaddata zadmin/users
# update_assets:
make update_assets
#populate_data:
make populate_data

Просмотреть файл

@ -43,6 +43,7 @@ commands =
py.test --create-db -n 3 -m 'not es_tests' -v --ignore=tests/ui/ --ignore src/olympia/addons/ --ignore src/olympia/devhub/ --ignore src/olympia/editors/ --cov-report= --cov=src/olympia/ {posargs}
[testenv:ui-tests]
passenv = DISPLAY
install_command = pip install {packages}
deps = -rtests/ui/requirements.txt
commands = py.test --verify-base-url --driver=Firefox tests/ui {posargs}