-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update test suites to run in docker containers
The existing setup where it builds in travis is now failing due to some dependency i've not traced updating and not being compatible with the old version of php. This is expected as I was running the tests with `--ignore-platform-reqs` and tbh i'm a bit surprised its taken this long to fail in a way that forced me to refactor the process. Just 3 and a half years :) We need old and new versions of magento to composer install for the existing test coverage, we cannot rely on the versions of php supplied in phpenv within native travis as they're not always available. So I've built an image that does what we need. - To support this I've had to rename the test envs from `24` to `m24` so they could live in a docker compose file (as they can't just be numeric) - This also means the test files have had to move about a bit too. - You can now run the same setup locally without too much faffing about, although it is much slower on my macbook than in travis (likely because of the volume) - I ensured support for PHP 8.1 and latest version of magento as part of this, this meant bumping some dependencies like symfony/console and php-cs-fixer - I have the composer.json a little modified actually so it technically could still run older symfony console version, but thats not the version we've locked it to. This is because I have some tests that still do a 2.2.0 to -> 2.2.11, I need to verify all override types and tests are reflected in 2.4 series before I move these test cases about a little, see the TODO in `.travis.yml`
- Loading branch information
1 parent
2bdaa1d
commit d2ce9a2
Showing
21 changed files
with
2,361 additions
and
934 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
/.idea | ||
/vendor/ | ||
dev/instances/magento* | ||
.php_cs.cache | ||
.php_cs.cache | ||
dev/vendor/ | ||
dev/phpunit/functional/.phpunit.result.cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?php | ||
|
||
$finder = PhpCsFixer\Finder::create() | ||
->exclude('dev/instances') | ||
->exclude('dev/phpunit/unit/resources/') | ||
->in(__DIR__ . '/src'); | ||
|
||
$config = new PhpCsFixer\Config(); | ||
$config->setUsingCache(false); | ||
$config->setFinder($finder)->setRules([ | ||
'@PSR2' => true, | ||
'array_syntax' => ['syntax' => 'short'], | ||
'concat_space' => ['spacing' => 'one'], | ||
'include' => true, | ||
'new_with_braces' => true, | ||
'no_empty_statement' => true, | ||
'no_leading_import_slash' => true, | ||
'no_leading_namespace_whitespace' => true, | ||
'no_multiline_whitespace_around_double_arrow' => true, | ||
'multiline_whitespace_before_semicolons' => true, | ||
'no_singleline_whitespace_before_semicolons' => true, | ||
'no_trailing_comma_in_singleline_array' => true, | ||
'no_unused_imports' => true, | ||
'no_whitespace_in_blank_line' => true, | ||
'object_operator_without_whitespace' => true, | ||
'ordered_imports' => true, | ||
'standardize_not_equals' => true, | ||
'ternary_operator_spaces' => true | ||
]); | ||
|
||
return $config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.