2016-04-17 20:34:16 +03:00
|
|
|
language: php
|
|
|
|
|
|
|
|
branches:
|
|
|
|
only:
|
2017-12-27 17:43:59 +03:00
|
|
|
- /.*/
|
2016-04-17 20:34:16 +03:00
|
|
|
|
|
|
|
php:
|
2019-08-09 19:16:56 +03:00
|
|
|
- '7.2'
|
|
|
|
- '7.3'
|
2019-08-15 20:44:17 +03:00
|
|
|
- '7.4snapshot'
|
2019-08-09 19:16:56 +03:00
|
|
|
|
|
|
|
matrix:
|
|
|
|
allow_failures:
|
2019-08-15 20:44:17 +03:00
|
|
|
- php: '7.4snapshot'
|
2016-04-17 20:34:16 +03:00
|
|
|
|
2019-03-05 22:50:32 +03:00
|
|
|
services:
|
|
|
|
- mysql
|
|
|
|
- postgresql
|
2019-08-16 20:13:35 +03:00
|
|
|
- docker
|
2019-03-05 22:50:32 +03:00
|
|
|
|
2017-10-23 12:37:16 +03:00
|
|
|
before_install:
|
2018-10-18 21:26:44 +03:00
|
|
|
- echo 'extension = apcu.so' >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
|
2018-11-24 15:00:18 +03:00
|
|
|
- yes | pecl install swoole
|
2018-11-03 13:02:52 +03:00
|
|
|
- phpenv config-rm xdebug.ini || return 0
|
2016-08-09 19:50:14 +03:00
|
|
|
|
2018-09-24 20:38:22 +03:00
|
|
|
install:
|
2016-04-17 20:34:16 +03:00
|
|
|
- composer self-update
|
|
|
|
- composer install --no-interaction
|
|
|
|
|
2019-03-05 22:50:32 +03:00
|
|
|
before_script:
|
|
|
|
- mysql -e 'CREATE DATABASE shlink_test;'
|
|
|
|
- psql -c 'create database shlink_test;' -U postgres
|
2019-03-05 22:58:48 +03:00
|
|
|
- mkdir build
|
2019-08-16 20:13:35 +03:00
|
|
|
- export DOCKERFILE_CHANGED=$(git diff ${TRAVIS_COMMIT_RANGE:-origin/master} --name-only | grep Dockerfile)
|
2019-03-05 22:50:32 +03:00
|
|
|
|
2016-04-17 20:34:16 +03:00
|
|
|
script:
|
2019-01-20 23:49:07 +03:00
|
|
|
- composer ci
|
2019-08-16 21:49:24 +03:00
|
|
|
- if [[ ! -z "$DOCKERFILE_CHANGED" && "${TRAVIS_PHP_VERSION}" == "7.2" ]]; then docker build -t shlink-docker-image:temp . ; fi
|
2016-04-17 20:34:16 +03:00
|
|
|
|
2018-09-24 20:38:22 +03:00
|
|
|
after_success:
|
2018-11-03 12:58:46 +03:00
|
|
|
- rm -f build/clover.xml
|
2018-11-03 14:15:25 +03:00
|
|
|
- phpdbg -qrr vendor/bin/phpcov merge build --clover build/clover.xml
|
2016-04-17 20:34:16 +03:00
|
|
|
- wget https://scrutinizer-ci.com/ocular.phar
|
2017-10-23 13:51:06 +03:00
|
|
|
- php ocular.phar code-coverage:upload --format=php-clover build/clover.xml
|
2016-04-17 20:34:16 +03:00
|
|
|
|
2018-09-24 20:38:22 +03:00
|
|
|
# Before deploying, build dist file for current travis tag
|
|
|
|
before_deploy:
|
2018-10-18 22:49:31 +03:00
|
|
|
- rm -f ocular.phar
|
2018-09-24 20:38:22 +03:00
|
|
|
- ./build.sh ${TRAVIS_TAG#?}
|
|
|
|
|
|
|
|
deploy:
|
2018-12-16 11:26:08 +03:00
|
|
|
- provider: releases
|
|
|
|
api_key:
|
|
|
|
secure: a9dbZchocqeuOViwUeNH54bQR5Sz7rEYXx5b9WPFtnFn9LGKKUaLbA2U91UQ9QKPrcTpsALubUYbw2CnNmvCwzaY+R8lCD3gkU4ohsEnbpnw3deOeixI74sqBHJAuCH9FSaRDGILoBMtUKx2xlzIymFxkIsgIukkGbdkWHDlRWY3oTUUuw1SQ2Xk9KDsbJQtjIc1+G/O6gHaV4qv/R9W8NPmJExKTNDrAZbC1vIUnxqp4UpVo1hst8qPd1at94CndDYM5rG+7imGbdtxTxzamt819qdTO1OfvtctKawNAm7YXZrrWft6c7gI6j6SI4hxd+ZrrPBqbaRFHkZHjnNssO/yn4SaOHFFzccmu0MzvpPCf0qWZwd3sGHVYer1MnR2mHYqU84QPlW3nrHwJjkrpq3+q0JcBY6GsJs+RskHNtkMTKV05Iz6QUI5YZGwTpuXaRm036SmavjGc4IDlMaYCk/NmbB9BKpthJxLdUpczOHpnjXXHziotWD6cfEnbjU3byfD8HY5WrxSjsNT7SKmXN3hRof7bk985ewQVjGT42O3NbnfnqjQQWr/B7/zFTpLR4f526Bkq12CdCyf5lvrbq+POkLVdJ+uFfR7ds248Ue/jBQy6kM1tWmKF9QiwisFlA84eQ4CW3I93Rp97URv+AQa9zmbD0Ve3Udp+g6nF5I=
|
|
|
|
file: "./build/shlink_${TRAVIS_TAG#?}_dist.zip"
|
|
|
|
skip_cleanup: true
|
|
|
|
on:
|
|
|
|
tags: true
|
2019-08-16 20:13:35 +03:00
|
|
|
php: '7.2'
|