Do not run tests that download videos on CI

Travis get blacklisted by more and more services (Vimeo, Youtube, etc.)
This commit is contained in:
Pierre Rudloff 2019-10-26 16:13:08 +02:00
parent 9427a22a41
commit 1cab9623e9
9 changed files with 48 additions and 46 deletions

View file

@ -45,4 +45,29 @@ abstract class BaseTest extends TestCase
{
Config::destroyInstance();
}
/**
* Check tests requirements.
* @return void
*/
protected function checkRequirements()
{
parent::checkRequirements();
$annotations = $this->getAnnotations();
$requires = [];
if (isset($annotations['class']['requires'])) {
$requires += $annotations['class']['requires'];
}
if (isset($annotations['method']['requires'])) {
$requires += $annotations['method']['requires'];
}
foreach ($requires as $require) {
if ($require == 'download' && getenv('CI')) {
$this->markTestSkipped('Do not run tests that download videos on CI.');
}
}
}
}