Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
111c713
Issue #12944 - Remove all chosen related module and libs (#13087)
stamina84 Feb 24, 2020
f544de6
Issue #12929 - Vsite Preset - Project - Minimal (#13074)
jashish24 Feb 25, 2020
6126829
Issue #12931 - Users can create department/project vsites (#13090)
jashish24 Feb 25, 2020
672d539
Issue #12674 - Section Outline Settings (#13057)
kiran-axl Feb 25, 2020
bff6a55
Issue #13093 - Only show books related to current vsite (#13094)
kiran-axl Feb 25, 2020
1aca70c
Issue #12921 - Fix - No authors in publications after import (#13089)
uttkarsh-26 Feb 25, 2020
4a91252
Issue #12991 - Don't clear all css/js when custom theme is updated (#…
subhojit777 Feb 25, 2020
4d2a378
12831 import blog (#13088)
saurabh-axl Feb 25, 2020
5935884
Issue #12975 - Handle incorrect xml (#13096)
uttkarsh-26 Feb 26, 2020
e8d9928
Issue #12949 - Do not include OS Admin theme in selection list for cr…
shashikanth171 Feb 26, 2020
a30b9c5
Issue #12947 - Cache Build and Install in travis (#12969)
subhojit777 Feb 26, 2020
911a282
Issue #12950 - Fix - Vsite owner doesn't have access to cp item (#13091)
jiteshkhatwani Feb 27, 2020
bce5c5e
Issue #13104 - Hotfix for media browser issue (#13107)
stamina84 Feb 27, 2020
0bb9491
Issue #12921 - Editors fix and special characters coverage. (#13102)
uttkarsh-26 Feb 27, 2020
5794310
Issue #12844 - Import News (#13065)
saurabh-axl Feb 28, 2020
20998f3
Issue #12845 - Events CSV Import (WIP) (#13084)
saurabh-axl Feb 28, 2020
59df6d2
Issue #12947 - CI refactorings (#13109)
stamina84 Mar 2, 2020
9a193e0
Issue #13115 - theme name changes (#13116)
mukeyshkumar Mar 2, 2020
2317316
Issue #13108 - Support MM/DD/YYYY format during import (#13111)
Mar 2, 2020
bed2727
Issue #12689 - Do update core 8.8 with composer and update lock file
Mar 3, 2020
6699c2d
Issue #12689 - Fix drupal install path alias module
Mar 3, 2020
2724b59
Issue #12689 - Fix phpunit version to 7.x
Mar 3, 2020
99d9ddc
Issue #12689 - Composer order fix
Mar 4, 2020
f03b6ba
Issue #12689 - Update Drupa 8.8 default settings for travis
Mar 4, 2020
ac28787
Issue #12689 - Update Drupal 8.8 default settings
Mar 4, 2020
5271297
Issue #12689 - Try to fix class loader
Mar 4, 2020
477ed13
Issue #12689 - Replace Drupal scaffold with 8.8 version
Mar 4, 2020
6997113
Issue #12642 - Reduce filter with buckets - Terms (#13117)
jashish24 Mar 4, 2020
229917b
Issue #12689 - Fix detecting group path alias
Mar 4, 2020
3a5b350
Issue #12689 - Deprecated https://github.com/sebastianbergmann/phpuni…
Mar 4, 2020
5cc5636
Merge branch '8.x-1.x-dev' into 12689-update-core-8.8
Mar 4, 2020
6069199
Issue #12689 - Update config after install 8.8
Mar 4, 2020
7d87995
12844 import news (#13125)
saurabh-axl Mar 4, 2020
2b163b0
Issue #12689 - Re-apply patches, except https://www.drupal.org/node/2…
Mar 4, 2020
6acdcfb
13103 upgrade stage6 (#13118)
stamina84 Mar 4, 2020
3f3e02d
13052 display format fix (#13123)
rbran100 Mar 4, 2020
8565e89
Issue #12674 - Section Navigation widget (#13092)
subhojit777 Mar 5, 2020
39f530d
Issue #11403 - Added vsite url token
Mar 5, 2020
923d6b7
Issue #12689 - Update to latest core
Mar 5, 2020
9af9101
Issue #12927 - Limited access to import. (#13101)
rbran100 Mar 5, 2020
0d5e78c
Issue #11403 - Test case for vsite url token
Mar 5, 2020
f4f99e8
Issue #12689 - Fix allow override destination patch and upload to dru…
Mar 5, 2020
910c963
Test without pull
Mar 5, 2020
cac2263
Revert "Test without pull"
Mar 5, 2020
69f4da3
Merge pull request #13142 from openscholar/11403-vsite-token
Bilsi Mar 5, 2020
7163379
Merge branch '8.x-1.x-dev' into 12689-update-core-8.8
Mar 5, 2020
b1aa3a2
Issue #12689 - Fix deprecated os_pager functions
Mar 6, 2020
787f344
Issue #12689 - Fix node path assert
Mar 6, 2020
1361523
Issue #12689 - Ignore if pager not exists
Mar 6, 2020
a24c586
Issue #13052 - Code refactoring (#13141)
stamina84 Mar 9, 2020
95b7872
Issue #12845 - Tests (#13122)
saurabh-axl Mar 9, 2020
37ae5ab
Issue #12689 - Remove deprecated path.alias_manager
Mar 9, 2020
6f07044
Issue #12689 - Refactor vsite alias storage into repository as core 8…
Mar 9, 2020
9f47da2
Issue #12689 - Alter constraints in path_alias entity (WIP)
Mar 9, 2020
ad1b80c
Issue #13106 - Removing osInstalledThemes. (#13135)
shashikanth171 Mar 10, 2020
ebea310
Issue #12689 - Temporary skip one test
Mar 10, 2020
a43ae1f
Merge branch '8.x-1.x-dev' into 12689-update-core-8.8
Mar 10, 2020
9b5fd3f
Issue #12689 - Fix unit tests
Mar 10, 2020
44e220a
Issue #12689 - Fix visit publication entity page, not listing
Mar 10, 2020
6635239
Issue #12689 - Fix cancel button test
Mar 10, 2020
9e261ec
Issue #12689 - Assert fix and make it random string
Mar 10, 2020
0a8f0fb
Issue #12689 - Alias saving caos
Mar 10, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
48 changes: 34 additions & 14 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
language: php
dist: trusty
dist: xenial

cache:
directories:
- $HOME/.composer/cache/files
- $HOME/.composer/cache

addons:
artifacts:
Expand All @@ -23,26 +23,41 @@ env:
- DRUPAL_BASE_URL="http://127.0.0.1:8080"
- PATH="$PATH:$HOME/.composer/vendor/bin"
- TRAVIS_NODE_VERSION="4"
- AWS_ACCESS_KEY_ID=$ARTIFACTS_KEY
- AWS_SECRET_ACCESS_KEY=$ARTIFACTS_SECRET

stages:
- prepare for tests
- test
- name: codecov
if: branch = 8.x-1.x-dev

jobs:
include:
- script: robo job:check-coding-standards
- script: robo job:run-unit-tests
- script: robo job:check-module-circular-dependency
- script: robo job:run-kernel-tests "widgets-1,widgets-2,widgets-3,widgets-4,widgets-5"
- script: robo job:run-kernel-tests "publications-1,publications-2,wysiwyg,vsite,os,os-theme-preview"
- script: robo job:run-kernel-tests "cp-1,cp-2,other-1,other-2,cp-menu,profiles,redirect,cp-appearance,os-search"
- script: robo job:run-functional-tests "classes,events,pages,cp,media-browser,os-theme-preview,breadcrumbs,cp-menu,vsite_favicon"
- script: robo job:run-functional-tests "os-search,analytics,publications,cp-appearance,redirect,twitter,os,vsite,cp-import"
- script: robo job:run-functional-javascript-tests "publications,mailchimp,metatag,redirect,cp-appearance,vsite-preset"
- script: robo job:run-functional-javascript-tests "os-search,cp,profiles,classes,pages"
- script: robo job:run-functional-javascript-tests "events,vsite,widgets"
- script: robo job:run-functional-javascript-tests "os,os-theme-preview,blog,faq,news,presentations,cp-menu"
- stage: prepare for tests
script: robo job:check-coding-standards
- stage: prepare for tests
script: robo job:check-module-circular-dependency
- stage: test
script: robo job:run-unit-tests
- stage: test
script: robo job:run-kernel-tests "widgets-1,widgets-2,widgets-3,widgets-4,widgets-5"
- stage: test
script: robo job:run-kernel-tests "publications-1,publications-2,wysiwyg,vsite,os,os-theme-preview"
- stage: test
script: robo job:run-kernel-tests "cp-1,cp-2,other-1,other-2,cp-menu,profiles,redirect,cp-appearance,os-search"
- stage: test
script: robo job:run-functional-tests "classes,events,pages,cp,media-browser,os-theme-preview,breadcrumbs,cp-menu,vsite_favicon"
- stage: test
script: robo job:run-functional-tests "os-search,analytics,publications,cp-appearance,redirect,twitter,os,vsite,cp-import"
- stage: test
script: robo job:run-functional-javascript-tests "publications,mailchimp,metatag,redirect,cp-appearance,vsite-preset"
- stage: test
script: robo job:run-functional-javascript-tests "os-search,cp,profiles,classes,pages"
- stage: test
script: robo job:run-functional-javascript-tests "events,vsite,widgets"
- stage: test
script: robo job:run-functional-javascript-tests "os,os-theme-preview,blog,faq,news,presentations,cp-menu"
- stage: codecov
script: robo job:run-unit-tests-code-coverage
after_success: bash <(curl -s https://codecov.io/bash)
Expand Down Expand Up @@ -97,6 +112,9 @@ jobs:

before_install:
- echo 'sendmail_path = /bin/true' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
- pyenv global 3.7.1
- pip install -U pip
- pip install awscli

install:
- composer global require consolidation/robo:2.0.0
Expand All @@ -105,4 +123,6 @@ before_script:
- cp .travis/RoboFile.php .

after_failure:
- docker-compose logs php
- docker-compose logs mariadb
- artifacts upload
164 changes: 127 additions & 37 deletions .travis/RoboFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ public function __construct()
public function jobRunUnitTests($groups = '')
{
$collection = $this->collectionBuilder();
$collection->addTaskList($this->buildEnvironment());
$collection->addTaskList($this->buildDocker());
$collection->addTaskList($this->buildComposer());
$collection->addTaskList($this->runUnitTests($groups));
return $collection->run();
}
Expand All @@ -56,7 +57,8 @@ public function jobRunUnitTests($groups = '')
public function jobRunUnitTestsCodeCoverage($groups = '')
{
$collection = $this->collectionBuilder();
$collection->addTaskList($this->buildEnvironment());
$collection->addTaskList($this->buildDocker());
$collection->addTaskList($this->buildComposer());
$collection->addTaskList($this->enableXDebug());
$collection->addTaskList($this->runUnitTests($groups));
return $collection->run();
Expand All @@ -71,7 +73,8 @@ public function jobRunUnitTestsCodeCoverage($groups = '')
public function jobCheckCodingStandards()
{
$collection = $this->collectionBuilder();
$collection->addTaskList($this->buildEnvironment());
$collection->addTaskList($this->buildDocker());
$collection->addTaskList($this->buildComposer());
$collection->addTaskList($this->runCheckCodingStandards());
return $collection->run();
}
Expand All @@ -85,9 +88,12 @@ public function jobCheckCodingStandards()
public function jobCheckModuleCircularDependency()
{
$collection = $this->collectionBuilder();
$collection->addTaskList($this->buildEnvironment());
$collection->addTaskList($this->buildDocker());
$collection->addTaskList($this->buildComposer());
$collection->addTaskList($this->installDrupal());
$collection->addTaskList($this->uploadToAws());
$collection->addTaskList($this->runCheckModuleCircularDependency());
$collection->addTaskList($this->installTestConfigs());
return $collection->run();
}

Expand All @@ -101,7 +107,9 @@ public function jobRunKernelTests($groups = '')
{
$collection = $this->collectionBuilder();
$collection->addTaskList($this->buildEnvironment());
$collection->addTaskList($this->installDrupal());
$collection->addTaskList($this->buildDocker());
$collection->addTaskList($this->buildComposer());
$collection->addTaskList($this->importDatabase());
$collection->addTaskList($this->installTestConfigs());
$collection->addTaskList($this->runKernelTests($groups));
return $collection->run();
Expand All @@ -117,7 +125,9 @@ public function jobRunKernelTestsCodeCoverage($groups = '')
{
$collection = $this->collectionBuilder();
$collection->addTaskList($this->buildEnvironment());
$collection->addTaskList($this->installDrupal());
$collection->addTaskList($this->buildDocker());
$collection->addTaskList($this->buildComposer());
$collection->addTaskList($this->importDatabase());
$collection->addTaskList($this->installTestConfigs());
$collection->addTaskList($this->enableXDebug());
$collection->addTaskList($this->runKernelTests($groups));
Expand All @@ -136,7 +146,9 @@ public function jobRunFunctionalTests($groups = '')
{
$collection = $this->collectionBuilder();
$collection->addTaskList($this->buildEnvironment());
$collection->addTaskList($this->installDrupal());
$collection->addTaskList($this->buildDocker());
$collection->addTaskList($this->buildComposer());
$collection->addTaskList($this->importDatabase());
$collection->addTaskList($this->installTestConfigs());
$collection->addTaskList($this->runFunctionalTests($groups));
return $collection->run();
Expand All @@ -154,7 +166,9 @@ public function jobRunFunctionalJavascriptTests($groups = '')
{
$collection = $this->collectionBuilder();
$collection->addTaskList($this->buildEnvironment());
$collection->addTaskList($this->installDrupal());
$collection->addTaskList($this->buildDocker());
$collection->addTaskList($this->buildComposer());
$collection->addTaskList($this->importDatabase());
$collection->addTaskList($this->installTestConfigs());
$collection->addTaskList($this->runFunctionalJavascriptTests($groups));
return $collection->run();
Expand All @@ -171,6 +185,8 @@ public function jobRunBehatTests()
$collection = $this->collectionBuilder();
$collection->addTaskList($this->downloadDatabase());
$collection->addTaskList($this->buildEnvironment());
$collection->addTaskList($this->buildDocker());
$collection->addTaskList($this->importDatabase());
$collection->addTask($this->waitForDrupal());
$collection->addTaskList($this->runUpdatePath());
$collection->addTaskList($this->runBehatTests());
Expand Down Expand Up @@ -198,35 +214,110 @@ protected function downloadDatabase()
return $tasks;
}

/**
* Builds the Docker environment.
*
* @return \Robo\Task\Base\Exec[]
* An array of tasks.
*/
protected function buildEnvironment()
{
$force = true;
$tasks = [];
$tasks[] = $this->taskFilesystemStack()
->copy('.travis/docker-compose.yml', 'docker-compose.yml', $force)
->copy('.travis/traefik.yml', 'traefik.yml', $force)
->copy('.travis/.env', '.env', $force)
->copy('.travis/config/behat.yml', 'tests/behat.yml', $force);

$tasks[] = $this->taskExec('echo AWS_ACCESS_KEY_ID=' . getenv('ARTIFACTS_KEY') . ' >> .env');
$tasks[] = $this->taskExec('echo AWS_SECRET_ACCESS_KEY=' . getenv('ARTIFACTS_SECRET') . ' >> .env');
$tasks[] = $this->taskExec('echo AWS_ES_ACCESS_ENDPOINT=' . getenv('ARTIFACTS_ES_ENDPOINT') . ' >> .env');
$tasks[] = $this->taskExec('docker-compose --verbose pull --parallel');
$tasks[] = $this->taskExec('docker-compose up -d');
$tasks[] = $this->taskExec('docker-compose exec -T php composer global require hirak/prestissimo');
$tasks[] = $this->taskExec('make');
$tasks[] = $this->taskExec('docker-compose exec -T php cp .travis/config/phpunit.xml web/core/phpunit.xml');
$tasks[] = $this->taskExec('docker-compose exec -T php cp .travis/config//bootstrap.php web/core/tests/bootstrap.php');
$tasks[] = $this->taskExec('docker-compose exec -T php mkdir -p web/sites/simpletest');
/**
* Creates the Docker environment.
*
* @return \Robo\Task\Base\Exec[]
* An array of tasks.
*/
protected function buildDocker()
{
$force = true;
$tasks = [];
$tasks[] = $this->taskFilesystemStack()
->copy('.travis/docker-compose.yml', 'docker-compose.yml', $force)
->copy('.travis/traefik.yml', 'traefik.yml', $force)
->copy('.travis/.env', '.env', $force)
->copy('.travis/config/behat.yml', 'tests/behat.yml', $force);

$tasks[] = $this->taskExec('echo AWS_ACCESS_KEY_ID=' . getenv('ARTIFACTS_KEY') . ' >> .env');
$tasks[] = $this->taskExec('echo AWS_SECRET_ACCESS_KEY=' . getenv('ARTIFACTS_SECRET') . ' >> .env');
$tasks[] = $this->taskExec('echo AWS_ES_ACCESS_ENDPOINT=' . getenv('ARTIFACTS_ES_ENDPOINT') . ' >> .env');
$tasks[] = $this->taskExec('docker-compose pull');
$tasks[] = $this->taskExec('docker-compose up -d');

return $tasks;
}

return $tasks;
}
/**
* Build environment.
*
* @return \Robo\Task\Base\Exec[]
* An array of tasks.
*/
protected function buildEnvironment()
{
$tasks = [];

$tasks[] = $this->taskExec('aws s3 sync s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER .');
$tasks[] = $this->taskExec('tar -Jxf os-build-${TRAVIS_BUILD_NUMBER}-custom_themes.tar.xz');
$tasks[] = $this->taskExec('sudo chown -R 1000:1000 custom_themes');

return $tasks;
}
/**
* Import database.
*
* @return \Robo\Task\Base\Exec[]
* An array of tasks.
*/
protected function importDatabase()
{
$tasks = [];

// Fix import issue.
$tasks[] = $this->taskExec('sudo tar -Jxf os-build-${TRAVIS_BUILD_NUMBER}-db.tar.xz web');
$tasks[] = $this->taskExec('sudo tar -Jxf os-build-${TRAVIS_BUILD_NUMBER}-settings.tar.xz web/sites/default');
$tasks[] = $this->taskExec('sudo tar -Jxf os-build-${TRAVIS_BUILD_NUMBER}-files.tar.xz web/sites/default');
$tasks[] = $this->taskExec('sudo chown -R 1000:1000 web/sites/default');
// Import sql.
$tasks[] = $this->taskExec('docker-compose exec -T php drush sqlq --file=./travis-backup.sql');

return $tasks;
}

/**
* Create sql dump and compressed build and upload to S3.
*
* @return \Robo\Task\Base\Exec[]
* A collection of tasks.
*/
protected function uploadToAws()
{
$tasks[] = $this->taskExec('docker-compose exec -T php drush sql-dump --result-file=./travis-backup.sql');
// Build the artifacts.
$tasks[] = $this->taskExec('tar -Jcf ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-db.tar.xz web/travis-backup.sql');
$tasks[] = $this->taskExec('tar -Jcf ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-settings.tar.xz web/sites/default/settings.php');
$tasks[] = $this->taskExec('tar -Jcf ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-custom_themes.tar.xz custom_themes');
$tasks[] = $this->taskExec('tar -Jcf ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-files.tar.xz web/sites/default/files');
// Upload the artifacts.
$tasks[] = $this->taskExec('aws s3 cp ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-db.tar.xz s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER/os-build-${TRAVIS_BUILD_NUMBER}-db.tar.xz');
$tasks[] = $this->taskExec('aws s3 cp ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-settings.tar.xz s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER/os-build-${TRAVIS_BUILD_NUMBER}-settings.tar.xz');
$tasks[] = $this->taskExec('aws s3 cp ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-custom_themes.tar.xz s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER/os-build-${TRAVIS_BUILD_NUMBER}-custom_themes.tar.xz');
$tasks[] = $this->taskExec('aws s3 cp ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-files.tar.xz s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER/os-build-${TRAVIS_BUILD_NUMBER}-files.tar.xz');

return $tasks;
}

/**
* Builds the Code Base.
*
* @return \Robo\Task\Base\Exec[]
* An array of tasks.
*/
protected function buildComposer()
{
$force = true;
$tasks = [];

$tasks[] = $this->taskExec('docker-compose exec -T php composer global require hirak/prestissimo');
$tasks[] = $this->taskExec('make');
$tasks[] = $this->taskExec('docker-compose exec -T php cp .travis/config/phpunit.xml web/core/phpunit.xml');
$tasks[] = $this->taskExec('docker-compose exec -T php cp .travis/config//bootstrap.php web/core/tests/bootstrap.php');
$tasks[] = $this->taskExec('docker-compose exec -T php mkdir -p web/sites/simpletest');

return $tasks;
}

/**
* Enables xdebug in the Docker environment.
Expand All @@ -239,7 +330,6 @@ protected function enableXDebug()
$tasks[] = $this->taskExecStack()
->exec('echo PHP_XDEBUG_ENABLED=1 >> .env')
->exec('docker-compose up -d');

return $tasks;
}

Expand Down
4 changes: 3 additions & 1 deletion .travis/config/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
*
* @param string $scan_directory
* The directory that should be recursively scanned.
*
* @return array
* An associative array of extension directories found within the scanned
* directory, keyed by extension name.
Expand Down Expand Up @@ -78,7 +79,7 @@ function drupal_phpunit_contrib_extension_directory_roots($root = NULL) {
* @return array
* An associative array of extension directories, keyed by their namespace.
*/
function drupal_phpunit_get_extension_namespaces($dirs) {
function drupal_phpunit_get_extension_namespaces(array $dirs) {
$suite_names = [
'Unit',
'Kernel',
Expand Down Expand Up @@ -135,6 +136,7 @@ function drupal_phpunit_populate_class_loader() {
$loader = require __DIR__ . '/../../autoload.php';

// Start with classes in known locations.
$loader->add('Drupal\\TestTools', __DIR__);
$loader->add('Drupal\\Tests', __DIR__);
$loader->add('Drupal\\TestSite', __DIR__);
$loader->add('Drupal\\KernelTests', __DIR__);
Expand Down
Loading