-
Notifications
You must be signed in to change notification settings - Fork 149
/
.travis.yml
114 lines (100 loc) · 4.34 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
dist: trusty
language: php
php:
- 7.4
services:
- docker
env:
global:
- COMPOSE_FILE="doc/docker/base-dev.yml:doc/docker/selenium.yml"
- APP_ENV=behat
- APP_DEBUG=1
- COMPOSER_MEMORY_LIMIT=4G
- PHP_IMAGE=ezsystems/php:7.4-v2-node12
cache:
yarn: true
directories:
- $HOME/.composer/cache/files
# test only master (+ Pull requests)
branches:
only:
- master
- /^\d.\d+$/
# build tags (vX.Y.Z)
- /^v\d+.\d+.\d+$/
# list of behat arguments to test
matrix:
include:
- name: "eZ Platform REST Bundle functional tests"
env:
- TEST_CMD="./bin/.travis/run_rest_tests.sh"
- SYMFONY_CMD="ez:behat:create-language 'pol-PL' 'Polish (polski)'"
- name: "Kernel core tests"
env: BEHAT_OPTS="--mode=behat --profile=core --tags=~@broken"
- name: "Behat"
env: BEHAT_OPTS="--mode=behat --profile=behat --tags=~@broken"
- name: "Content Forms tests on Clean Platform"
env: BEHAT_OPTS="--mode=behat --profile=content-forms --tags=~@broken --non-strict"
- name: "Admin UI on Clean Platform"
env: BEHAT_OPTS="--profile=adminui --suite=adminui --tags=~@broken"
- name: "Admin UI on Clean Platform with Varnish and Redis"
env:
- COMPOSE_FILE="doc/docker/base-dev.yml:doc/docker/varnish.yml:doc/docker/redis.yml:doc/docker/selenium.yml"
- BEHAT_OPTS="--profile=adminui --suite=adminui --tags=~@broken"
- WEB_HOST="varnish"
# Nightly and triggered jobs for Clean OSS
- if: type in (cron, api)
name: "Admin UI tests using different personas"
env:
- SETUP_BEHAT_OPTS="--profile=setup --suite=personas --tags=@setup"
- BEHAT_OPTS="--profile=adminui --suite=personas"
- if: type in (cron, api)
name: "[PHP 7.3/PostgreSQL] Admin UI on Clean Platform"
env:
- COMPOSE_FILE="doc/docker/base-dev.yml:doc/docker/db-postgresql.yml:doc/docker/selenium.yml"
- BEHAT_OPTS="--profile=adminui --suite=adminui --tags=~@broken"
- PHP_IMAGE=ezsystems/php:7.3-v2-node12
# reduce depth (history) of git checkout
git:
depth: 30
notifications:
slack:
rooms:
- secure: Au7OQWGBO73aY34ovy3RtO99I47OzcmaJD2jX7e3wLd/u05xpKL+AkTP5fwaiAS8kWwUYQYOKd7Z7PBol6ExJRAfXKm1uCpGcCEH8x+s3mG1BvPbr5/uSchtsVA0hlEdIJ1nTkWSYiiT1GRjtjWcrLw9dCuwlYyublObQgHVrLE=
on_success: change
on_failure: always
on_pull_requests: false
before_install:
# Update Docker and Docker Compose
- ./bin/.travis/trusty/update_docker.sh
# Internal auth token dedicated to testing with travis+composer on ezsystems repos, not for reuse!
- echo "{\"github-oauth\":{\"github.com\":\"d0285ed5c8644f30547572ead2ed897431c1fc09\"}}" > auth.json
# Disable XDebug for performance
- phpenv config-rm xdebug.ini
# Get latest composer build
- travis_retry composer selfupdate
# Avoid memory issues on composer install
- echo "memory_limit=-1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
install:
# Setup eZ Platform inside docker container
- /bin/bash ./bin/.travis/trusty/setup_ezplatform.sh "${COMPOSE_FILE}"
before_script:
# Execute Symfony command if injected into test matrix
- if [ "${SYMFONY_CMD}" != "" ] ; then docker-compose exec --user www-data app sh -c "bin/console ${SYMFONY_CMD}" ; fi
- if [ "${SETUP_BEHAT_OPTS}" != "" ] ; then cd "$HOME/build/ezplatform"; docker-compose exec --user www-data app sh -c "bin/ezbehat $SETUP_BEHAT_OPTS" ; fi
#- 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/selenium.yml
script:
- if [ "${TEST_CMD}" != "" ] ; then cd "$HOME/build/ezplatform"; docker-compose exec app sh -c "$TEST_CMD" ; fi
- if [ "${BEHAT_OPTS}" != "" ] ; then cd "$HOME/build/ezplatform"; docker-compose exec --user www-data app sh -c "bin/ezbehat $BEHAT_OPTS" ; fi
after_failure:
# Will show us the last bit of the log of container's main processes
# (not counting shell process above running php and behat)
# NOTE: errors during docker setup of travis build won't show up here (can't output all as it is too much in debug/verbose mode)
- docker-compose logs -t --tail=15
# Will show us what is up, and how long it's been up
- docker ps -s
after_script:
- if [ "${BEHAT_OPTS}" != "" ] ; then bin/ezreport ; fi