Travis: Move install commands to .ci/install.sh

pull/7135/head
Aleksander Machniak 5 years ago
parent 581bc6886b
commit f32b9ae51d

@ -0,0 +1,24 @@
#!/bin/bash
# The script is intended for use on Travis with Trusty distribution
set -x
DIR=$(dirname $0)
# Enable xdebug for code coverage
if [ "$CODE_COVERAGE" != 1 ]; then phpenv config-rm xdebug.ini || true; fi
cd $DIR/..
cp composer.json-dist composer.json
# Add laravel/dusk for Browser tests
if [ "$BROWSER_TESTS" = 1 ]; then composer require "laravel/dusk:~5.7.0" --no-update; fi
# Remove qr-code as it requires php-gd which is not always available on Travis
# and we don't really need it for tests
composer remove endroid/qr-code --no-update
# Install PHP dependencies
composer install --prefer-dist

@ -24,11 +24,7 @@ cache:
- $HOME/.composer
install:
- if [ "$CODE_COVERAGE" != 1 ]; then phpenv config-rm xdebug.ini || true; fi
- cp composer.json-dist composer.json
- if [ "$BROWSER_TESTS" = 1 ]; then composer require "laravel/dusk:~5.7.0" --no-update; fi
- composer remove endroid/qr-code --no-update
- composer install --prefer-dist
- .ci/install.sh
script:
- if [ "$CODE_COVERAGE" = 1 ]; then CODE_COVERAGE_ARGS="--coverage-text"; fi; vendor/bin/phpunit -c tests/phpunit.xml $CODE_COVERAGE_ARGS

@ -46,6 +46,9 @@ Please, keep the file as simple as possible, i.e. containing only database
and imap/smtp settings needed for the test user authentication. We would
want to test default configuration. Especially only Elastic skin is supported.
NOTE: See `.ci` directory for sample config and scripts we use for in-browser
tests on Travis.
EXECUTING THE TESTS
-------------------

Loading…
Cancel
Save