Skip to content

Commit

Permalink
Added custom module path.
Browse files Browse the repository at this point in the history
  • Loading branch information
arshadkhan53 committed May 14, 2022
1 parent 0334b3b commit 67c249c
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 8 deletions.
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ env:
global:
- DRUPAL_BASE_URL="https://127.0.0.1:49156"
matrix:
# - JOB=job:run-coding-standard-check
- JOB=job:run-coding-standard-check
- JOB=job:run-unit-test

install:
Expand All @@ -31,4 +31,5 @@ before_script:

script:
- vendor/bin/robo $JOB
- git remote -v

24 changes: 17 additions & 7 deletions RoboFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,35 @@
*/
class RoboFile extends \Robo\Tasks
{

public function __construct()
{
/**
* Implements constructor
*/
public function __construct() {
$this->stopOnFail();
}

/**
* Run coding standard validation.
*
* @return void
*/
public function jobRunCodingStandardCheck() {
return $this->taskExecStack()
->stopOnFail()
->exec('vendor/bin/phpcs --config-set installed_path vendor/drupal/coder/coder_sniffer')
->exec('vendor/bin/phpcs --standard=Drupal web/modules')
->exec('vendor/bin/phpcs --standard=DrupalPractice web/modules')
->exec('vendor/bin/phpcs --standard=Drupal web/modules/custom')
->exec('vendor/bin/phpcs --standard=DrupalPractice web/modules/custom')
->run();
}

/**
* Run test.
*
* @return void
*/
public function jobRunUnitTest() {
return $this->taskExecStack()
->stopOnFail()
->exec('ddev exec -s web vendor/bin/phpunit -c web/core --verbose web/modules')
->exec('ddev exec -s web vendor/bin/phpunit -c web/core --verbose web/modules/custom')
->run();
}
}

0 comments on commit 67c249c

Please sign in to comment.