mirror of
https://github.com/barryvdh/laravel-ide-helper.git
synced 2026-08-17 17:47:13 +00:00
* phpunit: use dedicate `Tests` namespace for tests * tests: replace phpunit with orchestra/testbench * phpunit: ignore result cache file * phpunit: adapt test for newer version * tests: add base testcase class with a helper to run/assert commands * tests: add test for ide-helper:eloquent * travis: add global default variables * travis: disable xdebug, speeds up running tests * travis: convert php versions to build matrix for environment vars * travis: only run phpcs/phpunit when the env vars signal it However phpcs only runs with one test combination from the matrix, not necessary to execute it every time.
40 lines
930 B
YAML
40 lines
930 B
YAML
language: php
|
|
|
|
## Cache composer
|
|
cache:
|
|
directories:
|
|
- $HOME/.composer/cache
|
|
|
|
env:
|
|
global:
|
|
- RUN_PHPUNIT=1
|
|
- RUN_PHPCS=0
|
|
|
|
matrix:
|
|
include:
|
|
- php: 7.0
|
|
env: RUN_PHPUNIT=0
|
|
- php: 7.0
|
|
env: RUN_PHPUNIT=0 COMPOSER_FLAGS="--prefer-stable --prefer-lowest"
|
|
- php: 7.1
|
|
env: RUN_PHPUNIT=0
|
|
- php: 7.2
|
|
- php: 7.3
|
|
- php: 7.4
|
|
env: RUN_PHPCS=1
|
|
|
|
before_script:
|
|
- phpenv config-rm xdebug.ini || true
|
|
|
|
install:
|
|
- |
|
|
if [[ $RUN_PHPUNIT = 0 ]]; then
|
|
# We assume the older PHP/Laravel versions and thus restore a working dependency system for them
|
|
composer remove --dev orchestra/testbench --no-interaction --no-update
|
|
fi
|
|
- travis_wait 20 travis_retry composer update ${COMPOSER_FLAGS} --no-interaction --prefer-dist
|
|
|
|
script:
|
|
- if [[ $RUN_PHPCS = 1 ]]; then vendor/bin/phpcs --standard=psr2 src/; fi
|
|
- if [[ $RUN_PHPUNIT = 1 ]]; then vendor/bin/phpunit; fi
|