This repository has been archived by the owner on Jan 3, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
39 lines (33 loc) · 1.73 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
dist: xenial
sudo: required
language: bash
services:
- docker
branches:
only:
- master
- dev
before_install:
- "docker info"
- "docker-compose --version"
install:
- "docker build -t djocker/app $TRAVIS_BUILD_DIR"
- "docker-compose -p app -f $TRAVIS_BUILD_DIR/.travis/docker-compose.yml up -d"
- "until docker logs app_minion 2>&1 | grep 'Application is not installed!'; do sleep 5; done"
- "docker exec app_minion runuser -s /bin/sh -c 'composer --working-dir=/var/www install --dev' www-data"
- "docker exec app_minion runuser -s /bin/sh -c 'cp /var/www/app/config/parameters.yml /var/www/app/config/parameters_test.yml' www-data"
- "docker exec app_minion runuser -s /bin/sh -c '/var/www/app/console oro:install --env='$SYMFONY_ENV' --no-interaction --timeout 3600 --force --drop-database --user-name=admin --user-firstname=John --user-lastname=Doe --user-password=admin --user-email=johndoe@example.com --organization-name=Acme --application-url=http://minion/' www-data"
- "docker exec app_minion supervisorctl stop app-cron"
- "docker exec app_minion supervisorctl stop mq-consumer"
# Fix wrong path in behat config
- docker exec app_minion runuser -s /bin/sh -c 'sed -ie "s/\.\.\/\.\.\/package\/platform/\/var\/www\/vendor\/oro\/platform/g" /var/www/behat.yml.dist' www-data
matrix:
include:
- env: SYMFONY_ENV=prod
script:
- "docker exec app_minion runuser -s /bin/sh -c 'cd /var/www; /var/www/vendor/behat/behat/bin/behat -v -s OroUserBundle' www-data"
- env: SYMFONY_ENV=test
script:
- "docker exec app_minion runuser -s /bin/sh -c 'cd /var/www; /var/www/vendor/phpunit/phpunit/phpunit -c /var/www/phpunit.xml.dist --testsuite unit' www-data"
after_failure:
- docker logs app_minion