Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/117 ddev commands #126

Merged
merged 5 commits into from
Sep 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .ddev/commands/web/phix
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
## Usage: phix
## Example: "ddev phix"

/var/www/html/bin/phpcbf
/var/www/html/bin/phpcbf $*
2 changes: 1 addition & 1 deletion .ddev/commands/web/phpcs
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
## Usage: phpcs
## Example: "ddev phpcs"

/var/www/html/bin/phpcs -p
/var/www/html/bin/phpcs -p $*
2 changes: 1 addition & 1 deletion .ddev/commands/web/phpstan
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
## Usage: phpix
## Example: "ddev phix"

/var/www/html/bin/phpstan
/var/www/html/bin/phpstan $*
4 changes: 2 additions & 2 deletions .ddev/commands/web/phpunit
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash

## Description: Run phpunit in the web container to run phpunit tests.
## Description: Run phpunit in the web container to run phpunit tests.
## Usage: phpunit
## Example: "ddev phpunit"

/var/www/html/bin/phpunit
/var/www/html/bin/phpunit $*
25 changes: 25 additions & 0 deletions .ddev/config.selenium-standalone-chrome.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# This file comes from https://github.com/ddev/ddev-selenium-standalone-chrome
#
web_environment:
- BROWSERTEST_OUTPUT_DIRECTORY=/tmp
- BROWSERTEST_OUTPUT_BASE_URL=${DDEV_PRIMARY_URL}
- SIMPLETEST_BASE_URL=http://web
- SIMPLETEST_DB=mysql://db:db@db/db
# Use disable-dev-shm-usage instead of setting shm_usage
# https://developers.google.com/web/tools/puppeteer/troubleshooting#tips
# The format of chromeOptions is defined at https://chromedriver.chromium.org/capabilities
- MINK_DRIVER_ARGS_WEBDRIVER=[\"chrome\", {\"browserName\":\"chrome\",\"chromeOptions\":{\"w3c\":false,\"args\":[\"--disable-gpu\",\"--headless\", \"--no-sandbox\", \"--disable-dev-shm-usage\"]}}, \"http://selenium-chrome:4444/wd/hub\"]
# Nightwatch
- DRUPAL_TEST_BASE_URL=http://web
- DRUPAL_TEST_DB_URL=mysql://db:db@db/db
- DRUPAL_TEST_WEBDRIVER_HOSTNAME=selenium-chrome
- DRUPAL_TEST_WEBDRIVER_PORT=4444
- DRUPAL_TEST_WEBDRIVER_PATH_PREFIX=/wd/hub
- DRUPAL_TEST_WEBDRIVER_CHROME_ARGS=--disable-gpu --headless --no-sandbox --disable-dev-shm-usage
- DRUPAL_TEST_CHROMEDRIVER_AUTOSTART=false
- DRUPAL_NIGHTWATCH_SEARCH_DIRECTORY=../
- DRUPAL_NIGHTWATCH_IGNORE_DIRECTORIES=node_modules,vendor,.*,sites/*/files,sites/*/private,sites/simpletest
- DRUPAL_NIGHTWATCH_OUTPUT=reports/nightwatch
# DTT
- DTT_BASE_URL=http://web
- DTT_MINK_DRIVER_ARGS=[\"chrome\", {\"browserName\":\"chrome\",\"chromeOptions\":{\"w3c\":false,\"args\":[\"--disable-gpu\",\"--headless\", \"--no-sandbox\", \"--disable-dev-shm-usage\"]}}, \"http://selenium-chrome:4444/wd/hub\"]
30 changes: 30 additions & 0 deletions .ddev/docker-compose.selenium-chrome.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# This file comes from https://github.com/ddev/ddev-selenium-standalone-chrome
#
version: '3.6'
services:
selenium-chrome:
image: seleniarm/standalone-chromium:4.1.4-20220429
container_name: ddev-${DDEV_SITENAME}-selenium-chrome
expose:
# The internal noVNC port, which operates over HTTP so it can be exposed
# through the router.
- 7900
environment:
- VIRTUAL_HOST=$DDEV_HOSTNAME
- HTTPS_EXPOSE=7900:7900
- HTTP_EXPOSE=7910:7900
external_links:
- ddev-router:${DDEV_SITENAME}.${DDEV_TLD}
# To enable VNC access for traditional VNC clients like macOS "Screen Sharing",
# uncomment the following two lines.
#ports:
# - "5900:5900"
labels:
com.ddev.site-name: ${DDEV_SITENAME}
com.ddev.approot: $DDEV_APPROOT
volumes:
- ".:/mnt/ddev_config"

web:
links:
- selenium-chrome
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,26 @@ For guidance on installing see:
- [Installing LocalGov Drupal locally with composer](https://github.com/localgovdrupal/localgov/blob/2.x/README.md#installing-localgov-drupal-locally-with-composer)
- [Getting started on LocalGov Drupal docs](https://docs.localgovdrupal.org/devs/getting-started/)

## Gitpod

Gitpod allows you to run a virtual development environment in the cloud in your browser.

This can be very useful for testing functionality, reviewing pull requests, or working on features.

### Before you start

You will need an account on Gitpod.

If you authenticate with your Github account, you will be able to push commits back to the repository you are working on.

[Sign up for gitpod.io](https://gitpod.io/login), if you haven't already.

### Spin up LocalGov Drupal with

Click on the "Open in Gitpod" button below

[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/localgovdrupal/localgov_project)

## Maintainers

This project is currently maintained by:
Expand Down
Loading