Skip to content

Commit

Permalink
tests: run all integration tests also with --prefer-lowest
Browse files Browse the repository at this point in the history
  • Loading branch information
JanTvrdik committed Sep 25, 2018
1 parent 75286b4 commit 5d167b8
Show file tree
Hide file tree
Showing 14 changed files with 52 additions and 24 deletions.
2 changes: 1 addition & 1 deletion composer.bridgeless.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"require-dev": {
"nette/tester": "~1.4",
"nette/tester": "~1.7",
"mockery/mockery": "~0.9"
},
"autoload": {
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"doctrine/cache": "~1.5",
"nette/database": "~2.2",
"nette/di": "~2.3.12 | ~2.4",
"nette/tester": "~1.4",
"nette/tester": "~1.7",
"nette/utils": "~2.3",
"nextras/dbal": "~1.0 | ~2.0",
"mockery/mockery": "~0.9",
Expand Down
2 changes: 2 additions & 0 deletions tests/cases/integration/symfony-bundle/SymfonyBundleTest.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ class SymfonyBundleTest extends TestCase
{
parent::setUp();

Environment::lock(__CLASS__, __DIR__ . '/../../../temp');

$options = Environment::loadData();
$driversConfig = parse_ini_file(__DIR__ . '/../../../drivers.ini', TRUE);
$dbalOptions = $driversConfig[$options['driver']];
Expand Down
2 changes: 1 addition & 1 deletion tests/matrix/dbal/doctrine-2.0.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
PHP_VERSION_MIN="50400"
PHP_VERSION_MAX="70299"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE doctrine/dbal:~2.0"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE doctrine/dbal:~2.5"
DBAL="doctrine"
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
PHP_VERSION_MIN="50400"
PHP_VERSION_MAX="70299"
PHP_VERSION_MAX="70199"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE nette/database:~2.2"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE nette/caching:~2.2"
DBAL="nette"
6 changes: 6 additions & 0 deletions tests/matrix/dbal/nette-2.0-php-7.2.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env bash
PHP_VERSION_MIN="70200"
PHP_VERSION_MAX="70299"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE nette/database:~2.4"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE nette/caching:~2.4"
DBAL="nette"
5 changes: 3 additions & 2 deletions tests/matrix/nette-di/nette-2.3-php-5.4.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
#!/usr/bin/env bash
PHP_VERSION_MIN="50400"
PHP_VERSION_MAX="50499"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE nette/di:~2.3.0"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE nette/di:~2.3.12"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE nette/utils:~2.3.0"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE dibi/dibi:~3.0"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE doctrine/dbal:~2.0"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE doctrine/dbal:~2.5"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE doctrine/orm:~2.0"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE nextras/dbal:~1.0"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/console:~2.0"
5 changes: 3 additions & 2 deletions tests/matrix/nette-di/nette-2.3-php-5.5-to-7.1.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
#!/usr/bin/env bash
PHP_VERSION_MIN="50500"
PHP_VERSION_MAX="70199"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE nette/di:~2.3.0"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE nette/di:~2.3.12"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE nette/utils:~2.3.0"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE dibi/dibi:~3.0"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE doctrine/dbal:~2.0"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE doctrine/dbal:~2.5"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE doctrine/orm:~2.0"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE nextras/dbal:~2.0"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/console:~3.0"
5 changes: 3 additions & 2 deletions tests/matrix/nette-di/nette-2.4-php-5.6-to-7.0.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
#!/usr/bin/env bash
PHP_VERSION_MIN="50600"
PHP_VERSION_MAX="70099"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE nette/di:~2.4.0"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE nette/di:~2.4.1"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE nette/utils:~2.4.0"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE dibi/dibi:~3.0"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE doctrine/dbal:~2.0"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE doctrine/dbal:~2.5"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE doctrine/orm:~2.0"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE nextras/dbal:~2.0"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/console:~3.0"
5 changes: 3 additions & 2 deletions tests/matrix/nette-di/nette-2.4-php-7.1-to-7.2.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
#!/usr/bin/env bash
PHP_VERSION_MIN="70100"
PHP_VERSION_MAX="70299"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE nette/di:~2.4.0"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE nette/di:~2.4.1"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE nette/utils:~2.4.0"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE dibi/dibi:~4.0"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE doctrine/dbal:~2.0"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE doctrine/dbal:~2.5"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE doctrine/orm:~2.0"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE nextras/dbal:~3.0"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/console:~4.0"
3 changes: 2 additions & 1 deletion tests/matrix/nette-di/nette-3.0-php-7.1-to-7.2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ PHP_VERSION_MAX="70299"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE nette/di:~3.0.0@alpha"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE nette/utils:~3.0.0@alpha"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE dibi/dibi:~4.0"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE doctrine/dbal:~2.0"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE doctrine/dbal:~2.5"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE doctrine/orm:~2.0"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE nextras/dbal:~3.0"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/console:~4.0"
16 changes: 9 additions & 7 deletions tests/matrix/symfony-bundle/symfony-3.0.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
#!/usr/bin/env bash
PHP_VERSION_MIN="50500"
PHP_VERSION_MAX="70299"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE doctrine/dbal:~2.0"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE doctrine/orm:~2.0"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE doctrine/dbal:~2.5"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE doctrine/orm:~2.5"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE doctrine/doctrine-bundle"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/config:~3.0"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/console:~3.0"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/dependency-injection:~3.0"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/http-kernel:~3.0"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/yaml:~3.0"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/config:~3.3"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/console:~3.3"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/dependency-injection:~3.3"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/doctrine-bridge:~3.3"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/framework-bundle:~3.3"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/http-kernel:~3.3"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/yaml:~3.3"
DBAL='doctrine'
6 changes: 4 additions & 2 deletions tests/matrix/symfony-bundle/symfony-4.0.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
#!/usr/bin/env bash
PHP_VERSION_MIN="70100"
PHP_VERSION_MAX="70299"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE doctrine/dbal:~2.0"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE doctrine/orm:~2.0"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE doctrine/dbal:~2.5"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE doctrine/orm:~2.5"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE doctrine/doctrine-bundle"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/config:~4.0"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/console:~4.0"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/dependency-injection:~4.0"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/doctrine-bridge:~4.0"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/framework-bundle:~4.0"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/http-kernel:~4.0"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/yaml:~4.0"
DBAL='doctrine'
15 changes: 13 additions & 2 deletions tests/run-integration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,16 @@ run()
fi

create_dbals_ini "$DBAL"
composer_prepare_dependencies "$COMPOSER_REQUIRE"

composer_prepare_dependencies "$COMPOSER_REQUIRE" ""
tester_run_integration_group "$INTEGRATION_GROUP"

echo
echo
echo "# $FILENAME with --prefer-lowest"
echo

composer_prepare_dependencies "$COMPOSER_REQUIRE" "--prefer-lowest"
tester_run_integration_group "$INTEGRATION_GROUP"
}

Expand All @@ -60,6 +69,7 @@ create_dbals_ini()
composer_prepare_dependencies()
{
COMPOSER_REQUIRE="$1"
COMPOSER_PREFER_LOWEST="$2"

cp "$PROJECT_DIR/composer.bridgeless.json" "$PROJECT_DIR/composer.json"

Expand All @@ -75,7 +85,8 @@ composer_prepare_dependencies()
composer update \
--no-interaction \
--no-progress \
--quiet
--quiet \
$COMPOSER_PREFER_LOWEST
}


Expand Down

0 comments on commit 5d167b8

Please sign in to comment.