Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 14 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ jobs:
include:
- stage: static-unit
script: ./tests/travis/static-unit.sh;
php: '7.0'
env:
- TEST_SUITE=static-unit
- script: ./tests/travis/static-unit.sh;
php: '7.1'
env:
- TEST_SUITE=static-unit
Expand All @@ -50,6 +46,10 @@ jobs:
- php: '7.3'
env:
- TEST_SUITE=functional-ee
- php: '7.4'
dist: bionic
env:
- TEST_SUITE=functional-ee
- php: '7.1'
env:
- TEST_SUITE=functional-ce
Expand All @@ -64,12 +64,22 @@ jobs:
- php: '7.3'
env:
- TEST_SUITE=functional-ce
- php: '7.4'
dist: bionic
env:
- TEST_SUITE=functional-ce

install:
- composer config http-basic.repo.magento.com ${REPO_USERNAME_CE} ${REPO_PASSWORD_CE}
- composer config github-oauth.github.com ${GITHUB_TOKEN}
- if [ -n "${MCD_VERSION}" ] && [ $TRAVIS_PHP_VERSION != "7.0" ]; then composer config repositories.mcd git git@github.com:magento/magento-cloud-docker.git && composer require "magento/magento-cloud-docker:${MCD_VERSION}" --no-update; fi;
- if [ -n "${MQP_VERSION}" ]; then composer config repositories.mqp git git@github.com:magento/quality-patches.git && composer require "magento/quality-patches:${MQP_VERSION}" --no-update; fi;
- if [ -n "${MCC_VERSION}" ]; then composer config repositories.mcc git git@github.com:magento/magento-cloud-components.git && composer require "magento/magento-cloud-components:${MCC_VERSION}" --no-update; fi;
- if [ -n "${ECE_VERSION}" ]; then composer config repositories.ece git git@github.com:magento/ece-tools.git && composer require "magento/ece-tools:${ECE_VERSION}" --no-update; fi;
- composer config repositories.magento composer https://repo.magento.com/
- composer require "magento/framework:*" --no-update
- composer require "magento/module-store:*" --no-update
- composer require "magento/module-url-rewrite:*" --no-update
- composer update -n --no-suggest

before_script:
Expand Down
10 changes: 9 additions & 1 deletion src/Test/Functional/Acceptance/AbstractCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ protected function prepareTemplate(\CliTester $I, string $templateVersion, strin
$I->addEceDockerGitRepoToComposer();
$I->addQualityPatchesGitRepoToComposer();
$I->addEceToolsGitRepoToComposer();
$I->addCloudComponentsGitRepoToComposer();
$I->addDependencyToComposer('magento/magento-cloud-patches', '1.0.99');
$I->addDependencyToComposer(
'magento/magento-cloud-docker',
Expand All @@ -50,7 +51,14 @@ protected function prepareTemplate(\CliTester $I, string $templateVersion, strin
$I->getDependencyVersion('magento/quality-patches')
);

$I->addDependencyToComposer('magento/ece-tools', 'dev-develop as 2002.1.99');
$I->addDependencyToComposer(
'magento/magento-cloud-components',
$I->getDependencyVersion('magento/magento-cloud-components')
);
$I->addDependencyToComposer(
'magento/ece-tools',
$I->getDependencyVersion('magento/ece-tools')
);

if ($this->edition === 'CE' || $magentoVersion) {
$version = $magentoVersion ?: $this->getVersionRangeForMagento($I);
Expand Down
19 changes: 19 additions & 0 deletions src/Test/Functional/Acceptance/Acceptance73CeCest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
declare(strict_types=1);

namespace Magento\CloudPatches\Test\Functional\Acceptance;

/**
* @group php73ce
*/
class Acceptance73CeCest extends Acceptance73Cest
{
/**
* @var string
*/
protected $edition = 'CE';
}
30 changes: 30 additions & 0 deletions src/Test/Functional/Acceptance/Acceptance73Cest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
declare(strict_types=1);

namespace Magento\CloudPatches\Test\Functional\Acceptance;

/**
* @group php73
*/
class Acceptance73Cest extends AcceptanceCest
{
/**
* @return array
*/
protected function patchesDataProvider(): array
{
return [
['templateVersion' => '2.3.3', 'magentoVersion' => '2.3.3'],
['templateVersion' => '2.3.3', 'magentoVersion' => '2.3.3-p1'],
['templateVersion' => '2.3.4', 'magentoVersion' => '2.3.4'],
['templateVersion' => '2.3.4', 'magentoVersion' => '2.3.4-p2'],
['templateVersion' => '2.3.5', 'magentoVersion' => '2.3.5'],
['templateVersion' => '2.3.5', 'magentoVersion' => '2.3.5-p1'],
['templateVersion' => '2.4.0', 'magentoVersion' => '2.4.0'],
];
}
}
2 changes: 1 addition & 1 deletion src/Test/Functional/Acceptance/AcceptanceCeCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
namespace Magento\CloudPatches\Test\Functional\Acceptance;

/**
* @group php73ce
* @group php74ce
*/
class AcceptanceCeCest extends AcceptanceCest
{
Expand Down
7 changes: 1 addition & 6 deletions src/Test/Functional/Acceptance/AcceptanceCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,7 @@ public function testPatches(\CliTester $I, \Codeception\Example $data): void
protected function patchesDataProvider(): array
{
return [
['templateVersion' => '2.3.3', 'magentoVersion' => '2.3.3'],
['templateVersion' => '2.3.3', 'magentoVersion' => '2.3.3-p1'],
['templateVersion' => '2.3.4', 'magentoVersion' => '2.3.4'],
['templateVersion' => '2.3.4', 'magentoVersion' => '2.3.4-p2'],
['templateVersion' => '2.3.5', 'magentoVersion' => '2.3.5'],
['templateVersion' => '2.3.5', 'magentoVersion' => '2.3.5-p1'],
['templateVersion' => '2.4.0', 'magentoVersion' => '2.4.0'],
['templateVersion' => 'master'],
];
}
Expand Down
3 changes: 3 additions & 0 deletions tests/travis/functional-ce.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,7 @@ case $TRAVIS_PHP_VERSION in
7.3)
./vendor/bin/codecept run -g php73ce --steps
;;
7.4)
./vendor/bin/codecept run -g php74ce --steps
;;
esac
3 changes: 3 additions & 0 deletions tests/travis/functional-ee.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,7 @@ case $TRAVIS_PHP_VERSION in
7.3)
./vendor/bin/codecept run -g php73 --steps
;;
7.4)
./vendor/bin/codecept run -g php74 --steps
;;
esac