forked from pimcore/pimcore-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.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: ewjj4rvz7VBx5sYbIBm6YKoIV8WdwVaZwcn79/YXPIg8h35pU9Goxg9I0yqkh02l4wph0C8qFK2tvz/y2X15l3oe9TCgXRIjjRji0xoggGiiP1Pw6Doil6hC5sJyT2XIBxWBvz3qTLWK4Zya3CWpWIFmKnWNqB6sdGXutlTH1HahiGfKsE+sm7MTH4Zo7LxpdCFRCgzFDRy1YjpxTMvC02qzlVmjmnXliJYnH8ab2sx7FYR488zWz3VlGBdrCissh6qGBy2+QZwrRwIUREwabpycZ6XMlxvnec7q7vc+SRe3ZmAjs/iotMg7MiO3AlSx7IjuJGvUd3HoCKPsv0+ZDkX8HKeLyY1U6BX4cGg/XNy6+xvwDdRvj8Zrfee6CdWUSJzZElvAoFjp4HZTcsc4I5QtyClnV8h6GgZwVIEm1/5lY6vC/lHPNP4IpmGkm5mB/MokD0Ky2lgQMjsCJqPOX8KGAkfcK/fC6nJ5jhYYwKlSrkEKzhT/k+lbO5kHxu1uAjTT2SWAM1S1isl1/a3OkeSesBQI8Q0RTnKysw7o+yjDd5OlVSjqksMQh/rpix8bINsR6YbHF1xu0qV8q/Vu1bvWxc3awz1n9stmhPnvfhU+FMZ4MoCXAx3P46kWSN6+Ci3eFOUrrmGXU1oezmEUs0JVIOTorzDAMkKnj5H3eDc=
on:
repo: pimcore/pimcore-cli
tags: true
condition: $DEPLOY = yes