forked from pimcore/pimcore-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
63 lines (50 loc) · 2.31 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
# this config is heavily inspired from https://github.com/FriendsOfPHP/PHP-CS-Fixer/blob/master/.travis.yml
language: php
sudo: false
env:
global:
- DEFAULT_COMPOSER_FLAGS="--no-interaction --no-progress --optimize-autoloader"
- TASK_TESTS=1
- TASK_CS=1
matrix:
fast_finish: true
include:
- php: 7.1
env: DEPLOY=yes
# - php: 7.0
cache:
directories:
- $HOME/.composer
before_install:
# turn off XDebug
- phpenv config-rm xdebug.ini || return 0
# display tasks configuration for a job
- set | grep ^TASK | sort
install:
- travis_retry composer install $DEFAULT_COMPOSER_FLAGS $COMPOSER_FLAGS
- composer info -D | sort
script:
- if [ $TASK_TESTS == 1 ]; then vendor/bin/phpunit --verbose; fi
- if [ $TASK_CS == 1 ]; then vendor/bin/php-cs-fixer --diff --dry-run -v fix; fi
before_deploy:
# install box2
- (mkdir -p $HOME/bin && cd $HOME/bin && curl -LSs http://box-project.github.io/box2/installer.php | php && mv box.phar box)
- box --version
# ensure that deps will work on lowest supported PHP version
- composer config platform.php 2> /dev/null || composer config platform.php 7.0.0
# update deps to highest possible for lowest supported PHP version
- composer install $DEFAULT_COMPOSER_FLAGS --no-dev
- composer info -D | sort
# build phar file
- mkdir -p build
- php -d phar.readonly=false $HOME/bin/box build
deploy:
provider: releases
file: build/pimcore.phar
skip_cleanup: true
api_key:
secure: jLqMdWsKCXSFRLr8S/FYhbVRoz6eXPrmUU6F0G2a3V8NGS25VgeCqBJuQFNjTZDn3c6EZj6wh1cf39FvT2cPvQTOXqAQMoqhe9ZiExMmSmrQXeWEk1g7bDlx2JYE2s4uuzvjBALu7/y78OA1akrAIg9N2hJ0uiS3W4xgPIzr3wjn7jouQkj7GwmaUhR+KNyn00s1dVBejcxMsv06vME50Bn8s4N9XkRX/U/w5R1+Pv2X69ZVcEi4cKxNi3IGEuWI8ioUR0W5gIUTkakL7GUfOYxb3JWXhjXINPmxK5Wa8TmXKVoDhOBWML/ToIg4neN7rcPGSQOuLruvsF/2ovOL74uD7htW1ftnxL2vUKfa6Ss2IKfx9YuWWuCVW22iFMwu0knevaCPUKsR1mMzaaaTP+HIr1JcIeUVX/7qWqDY7yX/3RwB3mQVUiRQpj8EKrbYJjWl3L7j6g+boMAu2NWvUiah7AnJMPPlK78cgyVfZvPZ7aMnZ1RPXeDw2hO9SjYZafY8xWUfEAIYm97lKsRWOVJ/jOLzS71ztV/hCj/t2vy53/CE/paenkGsqW9y2Vgo4HFA2hT8Av3BsYcpIwknJCMPXo7GsNCHoFiji02se85FypDpAVIW1gghNZB0S//snCiSqTSwHERweSWC4IuvQgpmMCKnvgq8xFsJbQGJfUA=
on:
repo: pimcore/pimcore-cli
tags: true
condition: $DEPLOY = yes