From ae9a67e17927609c58dad46e99d947e8accd8ebe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=B6ller?= Date: Tue, 10 Jul 2018 23:04:08 +0200 Subject: [PATCH] Enhancement: Run tests against lowest, locked, and highest dependencies --- .editorconfig | 3 ++ .travis.yml | 101 +++++++++++++++++++++++++++++++++++++++----------- 2 files changed, 83 insertions(+), 21 deletions(-) diff --git a/.editorconfig b/.editorconfig index 39eb9ea..d1a40bf 100644 --- a/.editorconfig +++ b/.editorconfig @@ -9,3 +9,6 @@ trim_trailing_whitespace = true [*.neon] indent_style = tab + +[*.yml] +indent_size = 2 diff --git a/.travis.yml b/.travis.yml index d06ca2d..e21352b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,28 +1,87 @@ language: php -php: - - 7.0 - - 7.1 - - 7.2 - cache: - directories: - - $HOME/.composer/cache/files + directories: + - $HOME/.composer/cache/files -before_install: - - phpenv config-rm xdebug.ini - - composer validate +stages: + - stan + - test -install: - - composer update --prefer-dist --prefer-stable --no-interaction +jobs: + include: + - stage: Stan + + php: 7.2 + + install: + - composer install + + script: + - vendor/bin/phpstan analyse -l max -c phpstan.neon src tests + + - &TEST + + stage: Test + + php: 7.0 + + env: WITH_LOWEST=true + + install: + - if [[ "$WITH_LOWEST" == "true" ]]; then composer update --prefer-lowest; fi + - if [[ "$WITH_LOCKED" == "true" ]]; then composer install; fi + - if [[ "$WITH_HIGHEST" == "true" ]]; then composer update; fi + + script: + - vendor/bin/phpunit + + - <<: *TEST + + php: 7.0 + + env: WITH_LOCKED=true + + - <<: *TEST + + php: 7.0 + + env: WITH_HIGHEST=true + + - <<: *TEST + + php: 7.1 + + env: WITH_LOWEST=true + + - <<: *TEST + + php: 7.1 + + env: WITH_LOCKED=true + + - <<: *TEST + + php: 7.1 + + env: WITH_HIGHEST=true + + - <<: *TEST + + php: 7.2 + + env: WITH_LOWEST=true + + - <<: *TEST + + php: 7.2 + + env: WITH_LOCKED=true + + - <<: *TEST + + php: 7.2 + + env: WITH_HIGHEST=true -script: - - vendor/bin/phpstan analyse -l max -c phpstan.neon src tests - - vendor/bin/phpunit -jobs: - include: - - stage: Test - php: 7.0 - env: PREFER_LOWEST=true - install: composer update --prefer-lowest --prefer-dist --prefer-stable --no-interaction