Skip to content

Latest commit

 

History

History
146 lines (110 loc) · 5.5 KB

README.md

File metadata and controls

146 lines (110 loc) · 5.5 KB

DDEV Annertech Tools

Highly opinionated set of configs and commands used by Annertech in our DDEV workflow.

Install

1. Get the new addon

Then get the addon:

ddev add-on get annertech/annertech-ddev

2. Commit to project repo

Add add-on files to git (happens automatically)
git add .ddev/commands/host/branch -f
git add .ddev/commands/host/cex -f
git add .ddev/commands/host/cim -f
git add .ddev/commands/host/cr -f
git add .ddev/commands/host/cloudflare -f
git add .ddev/commands/host/devmode -f
git add .ddev/commands/host/githooks -f
git add .ddev/commands/host/login -f
git add .ddev/commands/host/protect -f
git add .ddev/commands/host/remote-db -f
git add .ddev/commands/host/timeslip -f
git add .ddev/commands/web/behat -f
git add .ddev/commands/web/robo -f
git add .ddev/commands/web/platform -f
git add .ddev/commands/web/solr-update-config -f

git add .ddev/nginx/ -f
git add .ddev/scripts/ -f

git add .ddev/config.annertech.yaml -f
git add .ddev/settings.local.*mode.php -f

git add .ddev/.env -f

git add .ddev/addon-metadata/ -f

git add .vscode -f
git commit -m 'Add annertech/annertech-ddev addon' --no-verify

Features

Automatically disabled

are automatically disabled in local environment to facilitate development.

Automated Testing commands provided

Behat

ddev behat command is provided and expects behat to be under PROJECT_ROOT/tests/behat.

NOTE: Antibot will block Behat! Remember to uninstall it if needed.

BackstopJS

We rely on https://github.com/mmunz/ddev-backstopjs to get BackstopJS commands in DDEV. Go look there.

Cypress

We rely on https://github.com/tyler36/ddev-cypress and, if needed, https://www.drupal.org/project/drush_endpoint for Cypress tests.

ReCaptcha bypass

See https://github.com/Annertech/annertech-ddev/pull/29/files on how to bypass recaptcha when running automated tests.

Tricks

Handy shell aliases to add to your host machine:

# DDEV
alias composer='ddev composer'
alias behat='ddev behat'
alias drush='ddev drush'
alias platform='ddev platform'
alias robo='ddev robo'

alias xe='ddev xdebug enable'
alias xd='ddev xdebug disable'
alias xt='status=$(ddev xdebug status) &&  if [ "$status" == "xdebug enabled" ]; then ddev xdebug off; else ddev xdebug on; fi' 

# If you don't want to have platform cli installed on your host you can rely to the one in DDEV
alias platform='ddev exec platform'

Common Problems and How-To Fix Them

commit-msg hook is ignored

Check git config -l for the value of core.hooksPath and can change it to the local path with

git config --local core.hooksPath .git/hooks