-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
60 lines (50 loc) · 2.25 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
sudo: required
dist: trusty
language: generic
services:
- docker
cache:
directories:
- $HOME/.composer/cache/files
env:
global:
- COMPOSE_FILE="doc/docker-compose/base-dev.yml:doc/docker-compose/selenium.yml"
- SYMFONY_ENV=behat
- SYMFONY_DEBUG=1
# list of behat arguments to test
matrix:
- TEST_CMD="bin/behat -vv --profile=rest --suite=fullJson --tags=~@broken" COMPOSE_FILE="doc/docker-compose/base-prod.yml:doc/docker-compose/varnish.yml:doc/docker-compose/selenium.yml" WEB_HOST="varnish"
- TEST_CMD="bin/behat -vv --profile=rest --suite=fullXml --tags=~@broken"
- TEST_CMD="bin/behat -vv --profile=core --tags=~@broken"
- TEST_CMD="bin/phpunit -v vendor/ezsystems/ezpublish-kernel/eZ/Bundle/EzPublishRestBundle/Tests/Functional"
- TEST_CMD="bin/behat -vv --profile=platformui --tags='@common'" COMPOSE_FILE="doc/docker-compose/base-dev.yml:doc/docker-compose/redis.yml:doc/docker-compose/selenium.yml"
# test only master (+ Pull requests)
branches:
only:
- master
- /^\d.\d+$/
# Update Docker and Docker Compose
before_install: ./bin/.travis/trusty/update_docker.sh
before_script:
# Internal auth token dedicated to testing with travis+composer on ezsystems repos, not for reuse!
- echo "{\"github-oauth\":{\"github.com\":\"d0285ed5c8644f30547572ead2ed897431c1fc09\"}}" > auth.json
# In case of dev mode we'll need to install composer packages first
- docker-compose -f doc/docker-compose/install.yml up --abort-on-container-exit
# Run (start containers and execute install command)
- docker-compose up -d
#- docker ps
#- docker-compose logs
# Execute test command, need to use sh to get right exit code (docker/compose/issues/3379)
# Behat will use behat.yml which is a copy of behat.yml.dist with hostnames update by doc/docker-compose/selenium.yml
script: docker-compose exec --user www-data app sh -c "php /scripts/wait_for_db.php; php $TEST_CMD"
after_failure:
# Will show us the full log of container's main processes (not counting shell process above running php and behat)
- docker-compose logs -t --tail="all"
# Will show us what is up, and how long it's been up
- docker ps -s
# disable mail notifications
notifications:
email: false
# reduce depth (history) of git checkout
git:
depth: 30