shlink/.travis.yml

57 lines
1.6 KiB
YAML
Raw Normal View History

2020-05-05 22:58:23 +03:00
dist: bionic
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
services:
- docker
cache:
directories:
- $HOME/.composer/cache/files
jobs:
fast_finish: true
2020-07-23 17:34:25 +03:00
allow_failures:
- php: '8.0'
include:
2020-12-06 13:29:23 +03:00
- name: 'CI - 8.0'
php: '8.0'
2020-07-23 17:34:25 +03:00
env:
- COMPOSER_FLAGS='--ignore-platform-req=php'
2020-12-06 13:29:23 +03:00
- name: 'CI - 7.4'
php: '7.4'
2020-07-23 17:34:25 +03:00
env:
- COMPOSER_FLAGS=''
before_install:
2020-05-04 22:39:48 +03:00
- echo 'extension = apcu.so' >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
2018-11-03 13:02:52 +03:00
- phpenv config-rm xdebug.ini || return 0
- sudo ./data/infra/ci/install-ms-odbc.sh
- docker-compose -f docker-compose.yml -f docker-compose.ci.yml up -d shlink_db_ms shlink_db shlink_db_postgres shlink_db_maria
- yes | pecl install pdo_sqlsrv-5.9.0preview1 swoole-4.5.5 pcov
install:
2020-10-25 19:59:37 +03:00
- composer self-update
2020-07-23 17:34:25 +03:00
- composer install --no-interaction --prefer-dist $COMPOSER_FLAGS
2016-04-17 20:34:16 +03:00
before_script:
- docker-compose exec shlink_db_ms /opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P 'Passw0rd!' -Q "CREATE DATABASE shlink_test;"
- mkdir build
2020-06-21 13:21:39 +03:00
- export DOCKERFILE_CHANGED=$(git diff ${TRAVIS_COMMIT_RANGE:-origin/main} --name-only | grep Dockerfile)
2016-04-17 20:34:16 +03:00
script:
- composer ci
- bin/test/run-api-tests.sh
- if [[ ! -z "${DOCKERFILE_CHANGED}" && "${TRAVIS_PHP_VERSION}" == "7.4" ]]; then docker build -t shlink-docker-image:temp . ; fi
2016-04-17 20:34:16 +03:00
after_success:
- rm -f build/clover.xml
- wget https://phar.phpunit.de/phpcov-7.0.2.phar
2020-09-26 11:43:50 +03:00
- php phpcov-7.0.2.phar merge build --clover build/clover.xml
- wget https://scrutinizer-ci.com/ocular.phar
- php ocular.phar code-coverage:upload --format=php-clover build/clover.xml