Skip to content

Commit

Permalink
MC-34427: Cleanup travis configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
xmav committed May 26, 2020
1 parent 5a09115 commit 5a7e865
Show file tree
Hide file tree
Showing 13 changed files with 32 additions and 356 deletions.
2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ For more detailed information on contribution please read our [beginners guide](
* Unit/integration test coverage
* Proposed [documentation](https://devdocs.magento.com) updates. Documentation contributions can be submitted via the [devdocs GitHub](https://github.com/magento/devdocs).
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.
5. All automated tests must pass (all builds on [Travis CI](https://travis-ci.org/magento/magento2) must be green).
5. All automated tests must pass.

## Contribution process

Expand Down
9 changes: 0 additions & 9 deletions .htaccess
Original file line number Diff line number Diff line change
Expand Up @@ -238,15 +238,6 @@
Require all denied
</IfVersion>
</Files>
<Files .travis.yml>
<IfVersion < 2.4>
order allow,deny
deny from all
</IfVersion>
<IfVersion >= 2.4>
Require all denied
</IfVersion>
</Files>
<Files CHANGELOG.md>
<IfVersion < 2.4>
order allow,deny
Expand Down
9 changes: 0 additions & 9 deletions .htaccess.sample
Original file line number Diff line number Diff line change
Expand Up @@ -238,15 +238,6 @@
Require all denied
</IfVersion>
</Files>
<Files .travis.yml>
<IfVersion < 2.4>
order allow,deny
deny from all
</IfVersion>
<IfVersion >= 2.4>
Require all denied
</IfVersion>
</Files>
<Files CHANGELOG.md>
<IfVersion < 2.4>
order allow,deny
Expand Down
23 changes: 0 additions & 23 deletions dev/tests/integration/etc/install-config-mysql.travis.php.dist

This file was deleted.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ protected function setUp(): void
*/
public function testAppReinitializationNoMemoryLeak()
{
$this->markTestSkipped('Test fails at Travis. Skipped until MAGETWO-47111');
$this->markTestSkipped('Skipped until MAGETWO-47111');

$this->_deallocateUnusedMemory();
$actualMemoryUsage = $this->_helper->getRealMemoryUsage();
Expand Down
58 changes: 30 additions & 28 deletions dev/tests/integration/testsuite/Magento/Phpserver/PhpserverTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
*/
namespace Magento\Phpserver;

use Symfony\Component\Process\PhpExecutableFinder;
use Symfony\Component\Process\Process;

/**
* @magentoAppIsolation enabled
*
Expand All @@ -19,33 +22,15 @@ class PhpserverTest extends \PHPUnit\Framework\TestCase
{
const BASE_URL = '127.0.0.1:8082';

private static $serverPid;

/**
* @var \Laminas\Http\Client
* @var Process
*/
private $httpClient;
private $serverProcess;

/**
* Instantiate phpserver in the pub folder
* @var \Laminas\Http\Client
*/
public static function setUpBeforeClass(): void
{
if (!(defined('TRAVIS') && TRAVIS === true)) {
self::markTestSkipped('Travis environment test');
}
$return = [];

$baseDir = __DIR__ . '/../../../../../../';
$command = sprintf(
'cd %s && php -S %s -t ./pub/ ./phpserver/router.php >/dev/null 2>&1 & echo $!',
$baseDir,
static::BASE_URL
);
// phpcs:ignore
exec($command, $return);
static::$serverPid = (int) $return[0];
}
private $httpClient;

private function getUrl($url)
{
Expand All @@ -55,11 +40,33 @@ private function getUrl($url)
protected function setUp(): void
{
$this->httpClient = new \Laminas\Http\Client(null, ['timeout' => 10]);

/** @var Process $process */
$phpBinaryFinder = new PhpExecutableFinder();
$phpBinaryPath = $phpBinaryFinder->find();
$command = sprintf(
"%s -S %s -t ./pub ./phpserver/router.php",
$phpBinaryPath,
self::BASE_URL
);
$this->serverProcess = Process::fromShellCommandline(
$command,
realpath(__DIR__ . '/../../../../../../')
);
$this->serverProcess->start();
$this->serverProcess->waitUntil(function ($type, $output) {
return strpos($output, "Development Server") !== false;
});
}

protected function tearDown(): void
{
$this->serverProcess->stop();
}

public function testServerHasPid()
{
$this->assertTrue(static::$serverPid > 0);
$this->assertTrue($this->serverProcess->getPid() > 0);
}

public function testServerResponds()
Expand All @@ -86,9 +93,4 @@ public function testStaticImageFile()
$this->assertFalse($response->isClientError());
$this->assertStringStartsWith('image/gif', $response->getHeaders()->get('Content-Type')->getMediaType());
}

public static function tearDownAfterClass(): void
{
posix_kill(static::$serverPid, SIGKILL);
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

63 changes: 0 additions & 63 deletions dev/travis/before_install.sh

This file was deleted.

Loading

0 comments on commit 5a7e865

Please sign in to comment.