2016-04-17 12:34:16 -05:00
|
|
|
language: php
|
|
|
|
|
|
|
|
branches:
|
|
|
|
only:
|
2017-12-27 08:43:59 -06:00
|
|
|
- /.*/
|
2016-04-17 12:34:16 -05:00
|
|
|
|
|
|
|
php:
|
2019-12-14 03:57:29 -06:00
|
|
|
- '7.4'
|
2019-08-09 11:16:56 -05:00
|
|
|
|
2019-03-05 13:50:32 -06:00
|
|
|
services:
|
2019-08-16 12:13:35 -05:00
|
|
|
- docker
|
2019-03-05 13:50:32 -06:00
|
|
|
|
2019-11-09 04:25:33 -06:00
|
|
|
cache:
|
|
|
|
directories:
|
|
|
|
- $HOME/.composer/cache/files
|
|
|
|
|
2017-10-23 04:37:16 -05:00
|
|
|
before_install:
|
2020-05-04 14:39:48 -05:00
|
|
|
- sudo ./data/infra/ci/install-ms-odbc.sh
|
2020-05-04 14:28:53 -05:00
|
|
|
- docker-compose -f docker-compose.yml -f docker-compose.ci.yml up -d shlink_db_ms shlink_db shlink_db_postgres shlink_db_maria
|
2020-05-07 03:16:20 -05:00
|
|
|
- yes | pecl install pdo_sqlsrv swoole-4.4.18
|
2020-05-04 14:39:48 -05:00
|
|
|
- echo 'extension = apcu.so' >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
|
2018-11-03 05:02:52 -05:00
|
|
|
- phpenv config-rm xdebug.ini || return 0
|
2016-08-09 11:50:14 -05:00
|
|
|
|
2018-09-24 12:38:22 -05:00
|
|
|
install:
|
2016-04-17 12:34:16 -05:00
|
|
|
- composer self-update
|
2019-11-09 04:25:33 -06:00
|
|
|
- composer install --no-interaction --prefer-dist
|
2016-04-17 12:34:16 -05:00
|
|
|
|
2019-03-05 13:50:32 -06:00
|
|
|
before_script:
|
2020-05-04 13:34:28 -05:00
|
|
|
- docker-compose exec shlink_db_ms /opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P 'Passw0rd!' -Q "CREATE DATABASE shlink_test;"
|
2019-03-05 13:58:48 -06:00
|
|
|
- mkdir build
|
2019-08-16 12:13:35 -05:00
|
|
|
- export DOCKERFILE_CHANGED=$(git diff ${TRAVIS_COMMIT_RANGE:-origin/master} --name-only | grep Dockerfile)
|
2019-03-05 13:50:32 -06:00
|
|
|
|
2016-04-17 12:34:16 -05:00
|
|
|
script:
|
2019-01-20 14:49:07 -06:00
|
|
|
- composer ci
|
2019-12-17 04:50:18 -06:00
|
|
|
- if [[ ! -z "$DOCKERFILE_CHANGED" && "${TRAVIS_PHP_VERSION}" == "7.4" ]]; then docker build -t shlink-docker-image:temp . ; fi
|
2016-04-17 12:34:16 -05:00
|
|
|
|
2018-09-24 12:38:22 -05:00
|
|
|
after_success:
|
2018-11-03 04:58:46 -05:00
|
|
|
- rm -f build/clover.xml
|
2020-03-21 09:31:14 -05:00
|
|
|
- wget https://phar.phpunit.de/phpcov-7.0.2.phar
|
|
|
|
- phpdbg -qrr phpcov-7.0.2.phar merge build --clover build/clover.xml
|
2016-04-17 12:34:16 -05:00
|
|
|
- wget https://scrutinizer-ci.com/ocular.phar
|
2017-10-23 05:51:06 -05:00
|
|
|
- php ocular.phar code-coverage:upload --format=php-clover build/clover.xml
|
2016-04-17 12:34:16 -05:00
|
|
|
|
2018-09-24 12:38:22 -05:00
|
|
|
# Before deploying, build dist file for current travis tag
|
|
|
|
before_deploy:
|
2018-10-18 14:49:31 -05:00
|
|
|
- rm -f ocular.phar
|
2020-03-21 03:37:31 -05:00
|
|
|
- if [[ ! -z $TRAVIS_TAG && "${TRAVIS_PHP_VERSION}" == "7.4" ]]; then ./build.sh ${TRAVIS_TAG#?} ; fi
|
2018-09-24 12:38:22 -05:00
|
|
|
|
|
|
|
deploy:
|
2018-12-16 02:26:08 -06: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-12-17 04:50:18 -06:00
|
|
|
php: '7.4'
|
2020-03-28 13:48:06 -05:00
|
|
|
- provider: script
|
|
|
|
script: bash ./docker/build
|
|
|
|
on:
|
|
|
|
all_branches: true
|
|
|
|
condition: $TRAVIS_PULL_REQUEST == 'false'
|
|
|
|
php: '7.4'
|