forked from ezsystems/BehatBundle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
65 lines (56 loc) · 1.99 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
dist: trusty
language: php
php:
- 7.3
env:
global:
- EZPLATFORM_REPO="https://github.com/ezsystems/ezplatform.git"
- COMPOSE_FILE="doc/docker/base-dev.yml:doc/docker/selenium.yml"
- APP_ENV=behat
- APP_DEBUG=1
cache:
directories:
- $HOME/.composer/cache/files
# test only master and stable branches (+ Pull requests)
branches:
only:
- master
- /^\d+\.\d+$/
matrix:
include:
- name: "Code Style Check"
env: CHECK_CS=1
- name: "Unit tests"
env: PHPUNIT_CONFIG='phpunit.xml'
- name: "BehatBundle tests"
php: 7.3
env: BEHAT_OPTS="--profile=behat --suite=examples"
- name: "AdminUI Modules tests"
php: 7.3
env: BEHAT_OPTS="--profile=adminui --suite=adminuimodules"
git:
depth: 30
notifications:
email: false
slack:
rooms:
- secure: "XctNpZ4q36oCCn60DWxt0+E1C6hlr1f5Ry9dMSLgS9jsoz0M2dBb0aNrIJS1dOFDCV+SjQFmY53daIVJKxbDVpCM6/byd0rA5VGByD24NoxuzlQsR6JBHi1/nxDAGBsXUM0IpLl252x8kLjnRCAHfW1OoUjWFGhbK/mAY/ocl6A="
on_success: change
on_failure: always
on_pull_requests: false
before_install:
# 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:
# Install packages if needed
- if [ "${CHECK_CS}" == "1" -o "${PHPUNIT_CONFIG}" != "" ]; then travis_retry composer install --prefer-dist --no-interaction --no-suggest ; fi
# Prepare whole environment if needed
- if [ "${BEHAT_OPTS}" != "" ]; then ./bin/.travis/prepare_ezplatform.sh ; fi
script:
- if [ "${CHECK_CS}" == "1" ] ; then ./vendor/bin/php-cs-fixer fix -v --dry-run --show-progress=estimating ; fi
- if [ "${PHPUNIT_CONFIG}" != '' ]; then ./vendor/bin/phpunit -c "${PHPUNIT_CONFIG}"; fi
- if [ "${BEHAT_OPTS}" != "" ]; then cd "$HOME/build/ezplatform"; docker-compose exec --user www-data app sh -c "bin/behat $BEHAT_OPTS" ; fi