Skip to content
Snippets Groups Projects
Unverified Commit 3cdb32bd authored by Finn Lewis's avatar Finn Lewis Committed by GitHub
Browse files

Merge pull request #135 from localgovdrupal/3.x

Release for 3.0.0-beta1
parents d632a7c8 9879c144
No related branches found
Tags 3.0.0 3.0.0-beta1
No related merge requests found
......@@ -4,4 +4,4 @@
## Usage: phix
## Example: "ddev phix"
/var/www/html/bin/phpcbf
/var/www/html/bin/phpcbf $*
......@@ -4,4 +4,4 @@
## Usage: phpcs
## Example: "ddev phpcs"
/var/www/html/bin/phpcs -p
\ No newline at end of file
/var/www/html/bin/phpcs -p $*
\ No newline at end of file
......@@ -4,4 +4,4 @@
## Usage: phpix
## Example: "ddev phix"
/var/www/html/bin/phpstan
\ No newline at end of file
/var/www/html/bin/phpstan $*
\ No newline at end of file
......@@ -4,4 +4,4 @@
## Usage: phpunit
## Example: "ddev phpunit"
/var/www/html/bin/phpunit
\ No newline at end of file
/var/www/html/bin/phpunit $*
\ No newline at end of file
# 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\"]
# 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
......@@ -12,6 +12,7 @@ on:
- '3.x'
schedule:
- cron: "0 7 * * *"
workflow_dispatch:
env:
LOCALGOV_DRUPAL_PROJECT: localgovdrupal/localgov-project
......@@ -22,6 +23,8 @@ jobs:
build:
name: Install LocalGov Drupal
runs-on: ubuntu-latest
env:
COMPOSER_EXIT_ON_PATCH_FAILURE: '1'
strategy:
fail-fast: false
......@@ -32,6 +35,7 @@ jobs:
- '~10.0'
php-version:
- '8.1'
- '8.2'
steps:
......@@ -75,7 +79,9 @@ jobs:
ref: php${{ matrix.php-version }}
- name: Create LocalGov Drupal project
run: composer create-project --stability dev localgovdrupal/localgov-project:${COMPOSER_REF} ./html
run: |
composer create-project --stability dev localgovdrupal/localgov-project:${COMPOSER_REF} ./html
composer --working-dir=./html require drupal/group
phpcs:
name: Coding standards checks
......@@ -91,6 +97,7 @@ jobs:
- '~10.0'
php-version:
- '8.1'
- '8.2'
steps:
......@@ -126,6 +133,7 @@ jobs:
- '~10.0'
php-version:
- '8.1'
- '8.2'
steps:
......@@ -160,6 +168,7 @@ jobs:
- '~10.0'
php-version:
- '8.1'
- '8.2'
steps:
......
name: localgov
recipe: drupal10
config:
xdebug: false
webroot: web
php: '8.1'
proxy:
......@@ -13,6 +12,11 @@ proxy:
- 'solr-sitewide.localgov.lndo.site:8983'
services:
appserver:
xdebug: true
build_as_root:
# This disables Xdebug during build, but puts all dependencies in place
# ready for the tooling to enable Xdebug.
- rm -f /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini && /etc/init.d/apache2 reload
overrides:
environment:
DRUSH_OPTIONS_ROOT: '/app/web'
......@@ -21,6 +25,9 @@ services:
MINK_DRIVER_ARGS_WEBDRIVER: '["chrome", { "chromeOptions": { "w3c": false } }, "http://chromedriver:4444/wd/hub"]'
BROWSERTEST_OUTPUT_DIRECTORY: '/app/web/sites/simpletest/browser_output'
BROWSERTEST_OUTPUT_BASE_URL: 'https://localgov.lndo.site'
# Support debugging CLI with Xdebug.
PHP_IDE_CONFIG: "serverName=appserver"
XDEBUG_SESSION: "lando"
build:
- mkdir -p web/sites/simpletest/browser_output
database:
......@@ -40,7 +47,7 @@ services:
command: '/bin/s6-svscan /etc/services.d'
portforward: true
node:
type: 'node:16'
type: 'node:18'
globals:
gulp-cli: latest
overrides:
......@@ -84,13 +91,13 @@ tooling:
cmd: '/app/bin/phpunit --testdox'
xdebug-on:
service: appserver
description: Enable xdebug for apache.
cmd: "docker-php-ext-enable xdebug && /etc/init.d/apache2 reload"
description: Enable Xdebug for Apache.
cmd: rm -f /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini && docker-php-ext-enable xdebug && /etc/init.d/apache2 reload && echo "Xdebug enabled"
user: root
xdebug-off:
service: appserver
description: Disable xdebug for apache.
cmd: "rm /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini && /etc/init.d/apache2 reload"
description: Disable Xdebug for Apache.
cmd: rm -f /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini && /etc/init.d/apache2 reload && echo "Xdebug disabled"
user: root
gulp:
service: node
......
{
"configurations": [
{
"name": "Listen for Xdebug",
"name": "Listen for Xdebug (ddev)",
"type": "php",
"request": "launch",
"port": 9003,
"pathMappings": {
"/var/www/html": "${workspaceRoot}"
}
},
{
"name": "Listen for Xdebug (lando)",
"type": "php",
"request": "launch",
"port": 9003,
"pathMappings": {
"/app": "${workspaceRoot}"
}
}
]
}
......@@ -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:
......
......@@ -130,15 +130,20 @@ $settings['rebuild_access'] = TRUE;
*/
$settings['skip_permissions_hardening'] = TRUE;
/**
* Get Lando info
*/
$lando_info = json_decode(getenv('LANDO_INFO'), TRUE);
/**
* Lando database credentials.
*/
$databases['default']['default'] = array (
'database' => 'database',
'username' => 'database',
'password' => 'database',
'host' => 'database',
'port' => '3306',
'database' => $lando_info['database']['creds']['database'],
'username' => $lando_info['database']['creds']['user'],
'password' => $lando_info['database']['creds']['password'],
'host' => $lando_info['database']['internal_connection']['host'],
'port' => $lando_info['database']['internal_connection']['port'],
'driver' => 'mysql',
'prefix' => '',
'collation' => 'utf8mb4_general_ci',
......
parameters:
# we don't set a level so that we check deprecations only, and
# not to highlight unknown classes which are from composer suggestions
customRulesetUsed: true
reportUnmatchedIgnoredErrors: false
# Ignore phpstan-drupal extension's rules.
......@@ -7,6 +9,5 @@ parameters:
- '#Plugin definitions cannot be altered.#'
- '#Missing cache backend declaration for performance.#'
- '#Plugin manager has cache backend specified but does not declare cache tags.#'
#includes:
# - vendor/mglaman/phpstan-drupal/extension.neon
# - vendor/phpstan/phpstan-deprecation-rules/rules.neon
# new static() is a best practice in Drupal, so we cannot fix that.
- '#^Unsafe usage of new static#'
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment