Skip to content

Commit 5a7e865

Browse files
committed
MC-34427: Cleanup travis configuration
1 parent 5a09115 commit 5a7e865

File tree

13 files changed

+32
-356
lines changed

13 files changed

+32
-356
lines changed

.github/CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ For more detailed information on contribution please read our [beginners guide](
2323
* Unit/integration test coverage
2424
* Proposed [documentation](https://devdocs.magento.com) updates. Documentation contributions can be submitted via the [devdocs GitHub](https://github.com/magento/devdocs).
2525
4. For larger features or changes, please [open an issue](https://github.com/magento/magento2/issues) to discuss the proposed changes prior to development. This may prevent duplicate or unnecessary effort and allow other contributors to provide input.
26-
5. All automated tests must pass (all builds on [Travis CI](https://travis-ci.org/magento/magento2) must be green).
26+
5. All automated tests must pass.
2727

2828
## Contribution process
2929

.htaccess

-9
Original file line numberDiff line numberDiff line change
@@ -238,15 +238,6 @@
238238
Require all denied
239239
</IfVersion>
240240
</Files>
241-
<Files .travis.yml>
242-
<IfVersion < 2.4>
243-
order allow,deny
244-
deny from all
245-
</IfVersion>
246-
<IfVersion >= 2.4>
247-
Require all denied
248-
</IfVersion>
249-
</Files>
250241
<Files CHANGELOG.md>
251242
<IfVersion < 2.4>
252243
order allow,deny

.htaccess.sample

-9
Original file line numberDiff line numberDiff line change
@@ -238,15 +238,6 @@
238238
Require all denied
239239
</IfVersion>
240240
</Files>
241-
<Files .travis.yml>
242-
<IfVersion < 2.4>
243-
order allow,deny
244-
deny from all
245-
</IfVersion>
246-
<IfVersion >= 2.4>
247-
Require all denied
248-
</IfVersion>
249-
</Files>
250241
<Files CHANGELOG.md>
251242
<IfVersion < 2.4>
252243
order allow,deny

dev/tests/integration/etc/install-config-mysql.travis.php.dist

-23
This file was deleted.

dev/tests/integration/testsuite/Magento/Framework/Composer/_files/testFromCreateProject/composer.lock

-8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dev/tests/integration/testsuite/Magento/Framework/Composer/_files/testSkeleton/composer.lock

-8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dev/tests/integration/testsuite/Magento/MemoryUsageTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ protected function setUp(): void
3232
*/
3333
public function testAppReinitializationNoMemoryLeak()
3434
{
35-
$this->markTestSkipped('Test fails at Travis. Skipped until MAGETWO-47111');
35+
$this->markTestSkipped('Skipped until MAGETWO-47111');
3636

3737
$this->_deallocateUnusedMemory();
3838
$actualMemoryUsage = $this->_helper->getRealMemoryUsage();

dev/tests/integration/testsuite/Magento/Phpserver/PhpserverTest.php

+30-28
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
*/
66
namespace Magento\Phpserver;
77

8+
use Symfony\Component\Process\PhpExecutableFinder;
9+
use Symfony\Component\Process\Process;
10+
811
/**
912
* @magentoAppIsolation enabled
1013
*
@@ -19,33 +22,15 @@ class PhpserverTest extends \PHPUnit\Framework\TestCase
1922
{
2023
const BASE_URL = '127.0.0.1:8082';
2124

22-
private static $serverPid;
23-
2425
/**
25-
* @var \Laminas\Http\Client
26+
* @var Process
2627
*/
27-
private $httpClient;
28+
private $serverProcess;
2829

2930
/**
30-
* Instantiate phpserver in the pub folder
31+
* @var \Laminas\Http\Client
3132
*/
32-
public static function setUpBeforeClass(): void
33-
{
34-
if (!(defined('TRAVIS') && TRAVIS === true)) {
35-
self::markTestSkipped('Travis environment test');
36-
}
37-
$return = [];
38-
39-
$baseDir = __DIR__ . '/../../../../../../';
40-
$command = sprintf(
41-
'cd %s && php -S %s -t ./pub/ ./phpserver/router.php >/dev/null 2>&1 & echo $!',
42-
$baseDir,
43-
static::BASE_URL
44-
);
45-
// phpcs:ignore
46-
exec($command, $return);
47-
static::$serverPid = (int) $return[0];
48-
}
33+
private $httpClient;
4934

5035
private function getUrl($url)
5136
{
@@ -55,11 +40,33 @@ private function getUrl($url)
5540
protected function setUp(): void
5641
{
5742
$this->httpClient = new \Laminas\Http\Client(null, ['timeout' => 10]);
43+
44+
/** @var Process $process */
45+
$phpBinaryFinder = new PhpExecutableFinder();
46+
$phpBinaryPath = $phpBinaryFinder->find();
47+
$command = sprintf(
48+
"%s -S %s -t ./pub ./phpserver/router.php",
49+
$phpBinaryPath,
50+
self::BASE_URL
51+
);
52+
$this->serverProcess = Process::fromShellCommandline(
53+
$command,
54+
realpath(__DIR__ . '/../../../../../../')
55+
);
56+
$this->serverProcess->start();
57+
$this->serverProcess->waitUntil(function ($type, $output) {
58+
return strpos($output, "Development Server") !== false;
59+
});
60+
}
61+
62+
protected function tearDown(): void
63+
{
64+
$this->serverProcess->stop();
5865
}
5966

6067
public function testServerHasPid()
6168
{
62-
$this->assertTrue(static::$serverPid > 0);
69+
$this->assertTrue($this->serverProcess->getPid() > 0);
6370
}
6471

6572
public function testServerResponds()
@@ -86,9 +93,4 @@ public function testStaticImageFile()
8693
$this->assertFalse($response->isClientError());
8794
$this->assertStringStartsWith('image/gif', $response->getHeaders()->get('Content-Type')->getMediaType());
8895
}
89-
90-
public static function tearDownAfterClass(): void
91-
{
92-
posix_kill(static::$serverPid, SIGKILL);
93-
}
9496
}

dev/tests/integration/testsuite/Magento/Setup/Model/_files/testSkeleton/composer.lock

-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dev/travis/before_install.sh

-63
This file was deleted.

0 commit comments

Comments
 (0)