Run UI integration tests in Circle CI
This commit is contained in:
Родитель
fefca816a0
Коммит
6730f9a9f8
|
@ -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
|
|
@ -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
|
1
tox.ini
1
tox.ini
|
@ -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}
|
||||
|
|
Загрузка…
Ссылка в новой задаче