Skip to content

Commit

Permalink
Added pass scenarios.
Browse files Browse the repository at this point in the history
  • Loading branch information
arshadkhan53 committed May 14, 2022
1 parent 6400f61 commit 768a40b
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ before_script:
script:
- vendor/bin/robo job:run-test-check
- git remote -v

after_success:
- vendor/bin/robo job:run-deploy
# - git remote add upstream [YOUR_SERVER_REMOTE_LIKE_PANTHEON_OR_AQUIA]
# - git push upstream

28 changes: 25 additions & 3 deletions RoboFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,11 @@ 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/custom')
->exec('vendor/bin/phpcs --standard=DrupalPractice web/modules/custom')
// ->exec('vendor/bin/phpcs --standard=Drupal web/modules/custom')
// ->exec('vendor/bin/phpcs --standard=DrupalPractice web/modules/custom')
// This is to just test the script, remove below two lines and uncomment above for custom modules.
->exec('vendor/bin/phpcs --standard=Drupal web/core/modules/action/tests/src/Functional/ActionListTest.php')
->exec('vendor/bin/phpcs --standard=DrupalPractice web/core/modules/action/tests/src/Functional/ActionListTest.php')
->run();
}

Expand All @@ -37,7 +40,9 @@ public function jobRunCodingStandardCheck() {
public function jobRunUnitTest() {
return $this->taskExecStack()
->stopOnFail()
->exec('ddev exec -s web vendor/bin/phpunit -c web/core --verbose web/modules/custom')
// ->exec('ddev exec -s web vendor/bin/phpunit -c web/core --verbose web/modules/custom')
// This is to just test the script, remove below line and uncomment above for custom modules.
->exec('ddev exec -s web vendor/bin/phpunit -c web/core --verbose web/core/modules/action/tests/src/Unit/Menu/ActionLocalTasksTest.php')
->run();
}

Expand All @@ -53,4 +58,21 @@ public function jobRunTestChecks() {
->exec('vendor/bin/robo job:run-unit-test')
->run();
}

/**
* Run test.
*
* @return void
*/
public function jobRunDeploy() {
return $this->taskExecStack()
->stopOnFail()
// ->exec('git remote add upstream [YOUR_SERVER_REMOTE_LIKE_PANTHEON_OR_AQUIA]')
// ->exec('git push upstream')
->exec('ddev auth ssh')
// ->exec('ddev drush @site_alias cim -y')
// ->exec('ddev drush @site_alias updb -y')
// ->exec('ddev drush @site_alias cr')
->run();
}
}

0 comments on commit 768a40b

Please sign in to comment.