Skip to content

Commit

Permalink
Split out scenarios from the prep-dependencies script. (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
greg-1-anderson committed Nov 30, 2017
1 parent 331e8ff commit e61c098
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 17 deletions.
5 changes: 2 additions & 3 deletions .travis.yml
Expand Up @@ -19,7 +19,7 @@ matrix:
- php: 7.0.11
- php: 5.6
- php: 5.5
env: 'SCENARIO=symfony2 HIGHEST_LOWEST="update'
env: 'SCENARIO=symfony2 HIGHEST_LOWEST="update --prefer-lowest'

allow_failures:
- php: 7.2
Expand All @@ -36,8 +36,7 @@ install:
- 'composer scenario "${SCENARIO}" "${HIGHEST_LOWEST-install}"'

script:
- vendor/bin/phpcs --standard=PSR2 -n src
- vendor/bin/phpunit
- composer test

after_success:
- travis_retry php vendor/bin/coveralls -v
2 changes: 1 addition & 1 deletion tests/scripts/install-scenario
Expand Up @@ -20,4 +20,4 @@ echo "Switch to ${SCENARIO} scenario"
set -ex

composer -n --working-dir=$dir ${ACTION} --prefer-dist --no-scripts
composer -n --working-dir=$dir licenses
composer -n --working-dir=$dir info
36 changes: 23 additions & 13 deletions tests/scripts/prep-dependencies
@@ -1,19 +1,29 @@
#!/bin/bash

set -ex

SCENARIOS="symfony2 symfony3 symfony4 dev4"
AUTOLOAD_DIRECTORIES='src tests'

stability_dev4='dev'
#
# This script is called automatically on every `composer update`.
# See "post-update-cmd" in the "scripts" section of composer.json.
#
# This script will create a derived composer.json / composer.lock
# pair for every test scenario. Test scenarios are defined in the
# "scenarios" file, which should be customized to suit the needs
# of the project.
#

SELF_DIRNAME="`dirname -- "$0"`"
source ${SELF_DIRNAME}/scenarios

echo
echo "::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::"
echo "::"
echo ":: Update dependencies for the following scenarios:"
echo "::"
echo ":: ${SCENARIOS}"
echo "::"
echo "::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::"
echo

platform_php_symfony2='5.5'
platform_php_symfony3='5.6'

requirement_symfony2='symfony/console:^2.8'
requirement_symfony3='symfony/console:^3'
requirement_symfony4='symfony/console:^4'
requirement_dev4='symfony/console:^4'
set -ex

for SCENARIO in ${SCENARIOS} ; do

Expand Down
15 changes: 15 additions & 0 deletions tests/scripts/scenarios
@@ -0,0 +1,15 @@
#!/bin/bash

SCENARIOS="symfony2 symfony3 symfony4 dev4"

AUTOLOAD_DIRECTORIES='src tests'

stability_dev4='dev'

platform_php_symfony2='5.5'
platform_php_symfony3='5.6'

requirement_symfony2='symfony/console:^2.8'
requirement_symfony3='symfony/console:^3'
requirement_symfony4='symfony/console:^4'
requirement_dev4='symfony/console:^4'

0 comments on commit e61c098

Please sign in to comment.