Beispiel #1
0
    $idx->setUpEnvironment();
    if (!$idx->isRemoteReady()) {
        $idx->bootstrap();
    }
    $idx->remotePrepare();
    $idx->getStrategy()->deploy();
    $idx->remoteLinkSharedFolders();
    if ($idx->hasToMigrate()) {
        $idx->doctrineMigrate();
    }
    $idx->remote('cd ' . $idx->getNextReleaseFolder() . '/app/config && rm -f parameters.yml', !$go);
    $idx->remote('cd ' . $idx->getNextReleaseFolder() . '/app/config && ln -s parameters.' . $env . '.yml parameters.yml', !$go);
    $idx->cacheClear();
    $idx->switchToTheNextRelease();
    $idx->assetic();
    $idx->deleteOldReleases(6);
    $idx->remote('cd ' . $idx->getNextReleaseFolder() . ' && rm -Rf app/cache/*', !$go);
})->add('test:run', function ($filter = '') use($idx) {
    $idx->runTask('test:run-group', 'unit', $filter);
    $idx->runTask('test:run-group', 'integration', $filter);
    $idx->runTask('test:run-group', 'command', $filter);
    $idx->runTask('test:run-group', 'functional', $filter);
    $idx->runTask('test:run-group', 'functionalAdmin', $filter);
})->add('test:run-group', function ($group, $filter = "") use($idx) {
    if (!empty($filter)) {
        $filter = ' --filter ' . $filter;
    }
    try {
        $idx->local('bin/phpunit -c app/ --stderr --group=' . $group . " " . $filter);
    } catch (\Exception $e) {
        exit(1);