Skip to content

Commit

Permalink
Merge pull request #136 from mglaman/gh-123
Browse files Browse the repository at this point in the history
Weight all test modules higher
  • Loading branch information
mglaman authored May 12, 2021
2 parents cec4fdd + 2d31a27 commit b8b6642
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,13 @@ jobs:
cd ~/drupal
COMPOSER_MEMORY_LIMIT=-1 composer require drupal/token drupal/blazy
./vendor/bin/phpstan analyze web/modules/contrib/blazy --no-progress || if (($? == 255)); then false; else true; fi
COMPOSER_MEMORY_LIMIT=-1 composer remove drupal/token drupal/blazy
- name: 'Check "Cannot redeclare video_embed_media_media_bundle_insert()"'
run: |
cd ~/drupal
COMPOSER_MEMORY_LIMIT=-1 composer require drupal/video_embed_field drupal/slick
./vendor/bin/phpstan analyze web/modules/contrib --no-progress || if (($? == 255)); then false; else true; fi
COMPOSER_MEMORY_LIMIT=-1 composer remove drupal/video_embed_field drupal/slick
build_integration_no_phpunit:
continue-on-error: ${{ matrix.experimental }}
runs-on: "ubuntu-latest"
Expand Down
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ script:
- COMPOSER_MEMORY_LIMIT=-1 composer require drupal/token drupal/blazy
- ./vendor/bin/phpstan analyze web/modules/contrib/blazy --no-progress || if (($? == 255)); then false; else true; fi

# Check " Cannot redeclare video_embed_media_media_bundle_insert() due to slick_test.module"
- composer require drupal/video_embed_field drupal/slick
- ./vendor/bin/phpstan analyze web/modules/contrib/slick --no-progress || if (($? == 255)); then false; else true; fi

cache:
directories:
- $HOME/.composer/cache
3 changes: 1 addition & 2 deletions src/Drupal/DrupalAutoloader.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,7 @@ public function register(Container $container): void

$this->moduleData = array_merge($this->extensionDiscovery->scan('module'), $profiles);
usort($this->moduleData, static function (Extension $a, Extension $b) {
// blazy_test causes errors, ensure it is loaded last.
return $a->getName() === 'blazy_test' ? 10 : 0;
return strpos($a->getName(), '_test') !== false ? 10 : 0;
});
$this->themeData = $this->extensionDiscovery->scan('theme');
$this->addTestNamespaces();
Expand Down

0 comments on commit b8b6642

Please sign in to comment.