Skip to content

Commit 1981372

Browse files
committed
Initial setup
0 parents  commit 1981372

36 files changed

+3446
-0
lines changed

.ddev/commands/web/nightwatch

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
3+
## Description: Run Nightwatch
4+
## Usage: nightwatch [flags] [args]
5+
## Example: "ddev nightwatch" or "ddev nightwatch --tag core"
6+
7+
yarn --cwd /var/www/html/web/core test:nightwatch $@

.ddev/commands/web/phpunit

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
3+
## Description: Run PHPUnit
4+
## Usage: phpunit [flags] [args]
5+
## Example: "ddev phpunit --group big_pipe" or "ddev phpunit core/modules/action"
6+
7+
php ../vendor/bin/phpunit -c core/phpunit.xml.dist $@

.ddev/config.yaml

+178
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,178 @@
1+
name: nightwatch-training
2+
type: drupal9
3+
docroot: web
4+
php_version: "7.3"
5+
webserver_type: nginx-fpm
6+
router_http_port: "80"
7+
router_https_port: "443"
8+
xdebug_enabled: false
9+
additional_hostnames: []
10+
additional_fqdns: []
11+
mariadb_version: "10.3"
12+
mysql_version: ""
13+
provider: default
14+
use_dns_when_possible: true
15+
composer_version: "2"
16+
hooks:
17+
post-start:
18+
- exec: cd .. && composer install
19+
- exec: cd core && yarn install
20+
- exec: mkdir -p private/browsertest_output
21+
22+
# This config.yaml was created with ddev version v1.16.7
23+
# webimage: drud/ddev-webserver:v1.16.7
24+
# dbimage: drud/ddev-dbserver-mariadb-10.2:v1.16.0
25+
# dbaimage: phpmyadmin:5
26+
# However we do not recommend explicitly wiring these images into the
27+
# config.yaml as they may break future versions of ddev.
28+
# You can update this config.yaml using 'ddev config'.
29+
30+
# Key features of ddev's config.yaml:
31+
32+
# name: <projectname> # Name of the project, automatically provides
33+
# http://projectname.ddev.site and https://projectname.ddev.site
34+
35+
# type: <projecttype> # drupal6/7/8, backdrop, typo3, wordpress, php
36+
37+
# docroot: <relative_path> # Relative path to the directory containing index.php.
38+
39+
# php_version: "7.3" # PHP version to use, "5.6", "7.0", "7.1", "7.2", "7.3", "7.4" "8.0"
40+
41+
# You can explicitly specify the webimage, dbimage, dbaimage lines but this
42+
# is not recommended, as the images are often closely tied to ddev's' behavior,
43+
# so this can break upgrades.
44+
45+
# webimage: <docker_image> # nginx/php docker image.
46+
# dbimage: <docker_image> # mariadb docker image.
47+
# dbaimage: <docker_image>
48+
49+
# mariadb_version and mysql_version
50+
# ddev can use many versions of mariadb and mysql
51+
# However these directives are mutually exclusive
52+
# mariadb_version: 10.2
53+
# mysql_version: 8.0
54+
55+
# router_http_port: <port> # Port to be used for http (defaults to port 80)
56+
# router_https_port: <port> # Port for https (defaults to 443)
57+
58+
# xdebug_enabled: false # Set to true to enable xdebug and "ddev start" or "ddev restart"
59+
# Note that for most people the commands
60+
# "ddev xdebug" to enable xdebug and "ddev xdebug off" to disable it work better,
61+
# as leaving xdebug enabled all the time is a big performance hit.
62+
63+
# webserver_type: nginx-fpm # or apache-fpm
64+
65+
# timezone: Europe/Berlin
66+
# This is the timezone used in the containers and by PHP;
67+
# it can be set to any valid timezone,
68+
# see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
69+
# For example Europe/Dublin or MST7MDT
70+
71+
# composer_version: "2"
72+
# if composer_version:"" it will use the current ddev default composer release.
73+
# It can also be set to "1", to get most recent composer v1
74+
# or "2" for most recent composer v2.
75+
# It can be set to any existing specific composer version.
76+
# After first project 'ddev start' this will not be updated until it changes
77+
78+
# additional_hostnames:
79+
# - somename
80+
# - someothername
81+
# would provide http and https URLs for "somename.ddev.site"
82+
# and "someothername.ddev.site".
83+
84+
# additional_fqdns:
85+
# - example.com
86+
# - sub1.example.com
87+
# would provide http and https URLs for "example.com" and "sub1.example.com"
88+
# Please take care with this because it can cause great confusion.
89+
90+
# upload_dir: custom/upload/dir
91+
# would set the destination path for ddev import-files to custom/upload/dir.
92+
93+
# working_dir:
94+
# web: /var/www/html
95+
# db: /home
96+
# would set the default working directory for the web and db services.
97+
# These values specify the destination directory for ddev ssh and the
98+
# directory in which commands passed into ddev exec are run.
99+
100+
# omit_containers: [db, dba, ddev-ssh-agent]
101+
# Currently only these containers are supported. Some containers can also be
102+
# omitted globally in the ~/.ddev/global_config.yaml. Note that if you omit
103+
# the "db" container, several standard features of ddev that access the
104+
# database container will be unusable.
105+
106+
# nfs_mount_enabled: false
107+
# Great performance improvement but requires host configuration first.
108+
# See https://ddev.readthedocs.io/en/stable/users/performance/#using-nfs-to-mount-the-project-into-the-container
109+
110+
# host_https_port: "59002"
111+
# The host port binding for https can be explicitly specified. It is
112+
# dynamic unless otherwise specified.
113+
# This is not used by most people, most people use the *router* instead
114+
# of the localhost port.
115+
116+
# host_webserver_port: "59001"
117+
# The host port binding for the ddev-webserver can be explicitly specified. It is
118+
# dynamic unless otherwise specified.
119+
# This is not used by most people, most people use the *router* instead
120+
# of the localhost port.
121+
122+
# host_db_port: "59002"
123+
# The host port binding for the ddev-dbserver can be explicitly specified. It is dynamic
124+
# unless explicitly specified.
125+
126+
# phpmyadmin_port: "8036"
127+
# phpmyadmin_https_port: "8037"
128+
# The PHPMyAdmin ports can be changed from the default 8036 and 8037
129+
130+
# mailhog_port: "8025"
131+
# mailhog_https_port: "8026"
132+
# The MailHog ports can be changed from the default 8025 and 8026
133+
134+
# webimage_extra_packages: [php7.3-tidy, php-bcmath]
135+
# Extra Debian packages that are needed in the webimage can be added here
136+
137+
# dbimage_extra_packages: [telnet,netcat]
138+
# Extra Debian packages that are needed in the dbimage can be added here
139+
140+
# use_dns_when_possible: true
141+
# If the host has internet access and the domain configured can
142+
# successfully be looked up, DNS will be used for hostname resolution
143+
# instead of editing /etc/hosts
144+
# Defaults to true
145+
146+
# project_tld: ddev.site
147+
# The top-level domain used for project URLs
148+
# The default "ddev.site" allows DNS lookup via a wildcard
149+
# If you prefer you can change this to "ddev.local" to preserve
150+
# pre-v1.9 behavior.
151+
152+
# ngrok_args: --subdomain mysite --auth username:pass
153+
# Provide extra flags to the "ngrok http" command, see
154+
# https://ngrok.com/docs#http or run "ngrok http -h"
155+
156+
# disable_settings_management: false
157+
# If true, ddev will not create CMS-specific settings files like
158+
# Drupal's settings.php/settings.ddev.php or TYPO3's AdditionalSettings.php
159+
# In this case the user must provide all such settings.
160+
161+
# no_project_mount: false
162+
# (Experimental) If true, ddev will not mount the project into the web container;
163+
# the user is responsible for mounting it manually or via a script.
164+
# This is to enable experimentation with alternate file mounting strategies.
165+
# For advanced users only!
166+
167+
# provider: default # Currently either "default" or "pantheon"
168+
#
169+
# Many ddev commands can be extended to run tasks before or after the
170+
# ddev command is executed, for example "post-start", "post-import-db",
171+
# "pre-composer", "post-composer"
172+
# See https://ddev.readthedocs.io/en/stable/users/extending-commands/ for more
173+
# information on the commands that can be extended and the tasks you can define
174+
# for them. Example:
175+
#hooks:
176+
# post-import-db:
177+
# - exec: drush cr
178+
# - exec: drush updb

.ddev/docker-compose.testing.yaml

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
# Adds Chromedriver and Drupal PHPUnit test environment variables for running tests.
3+
version: '3.6'
4+
services:
5+
chromedriver:
6+
image: drupalci/chromedriver:production
7+
container_name: ddev-${DDEV_SITENAME}-chromedriver
8+
labels:
9+
com.ddev.site-name: ${DDEV_SITENAME}
10+
com.ddev.approot: $DDEV_APPROOT
11+
12+
web:
13+
links:
14+
- chromedriver:$DDEV_HOSTNAME
15+
environment:
16+
# PHPUnit
17+
SYMFONY_DEPRECATIONS_HELPER: weak
18+
SIMPLETEST_DB: mysql://db:db@db:3306/db
19+
SIMPLETEST_BASE_URL: http://web
20+
BROWSERTEST_OUTPUT_DIRECTORY: /var/www/html/private/browsertest_output
21+
BROWSERTEST_OUTPUT_BASE_URL: $DDEV_PRIMARY_URL
22+
MINK_DRIVER_ARGS_WEBDRIVER: '["chrome", {"browserName":"chrome","chromeOptions":{"args":["--disable-gpu","--headless", "--no-sandbox"]}}, "http://chromedriver:9515"]'
23+
24+
# Nightwatch
25+
DRUPAL_TEST_BASE_URL: http://web
26+
DRUPAL_TEST_DB_URL: mysql://db:db@db:3306/db
27+
DRUPAL_TEST_WEBDRIVER_HOSTNAME: chromedriver
28+
DRUPAL_TEST_WEBDRIVER_PORT: 9515
29+
DRUPAL_TEST_CHROMEDRIVER_AUTOSTART: 'true'
30+
DRUPAL_TEST_WEBDRIVER_CHROME_ARGS: "--disable-gpu --headless"
31+
DRUPAL_NIGHTWATCH_OUTPUT: reports/nightwatch
32+
DRUPAL_NIGHTWATCH_IGNORE_DIRECTORIES: node_modules,vendor,.*,sites/*/files,sites/*/private,sites/simpletest

.editorconfig

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Drupal editor configuration normalization
2+
# @see http://editorconfig.org/
3+
4+
# This is the top-most .editorconfig file; do not search in parent directories.
5+
root = true
6+
7+
# All files.
8+
[*]
9+
end_of_line = LF
10+
indent_style = space
11+
indent_size = 2
12+
charset = utf-8
13+
trim_trailing_whitespace = true
14+
insert_final_newline = true
15+
16+
[composer.{json,lock}]
17+
indent_size = 4

.gitattributes

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Drupal git normalization
2+
# @see https://www.kernel.org/pub/software/scm/git/docs/gitattributes.html
3+
# @see https://www.drupal.org/node/1542048
4+
5+
# Normally these settings would be done with macro attributes for improved
6+
# readability and easier maintenance. However macros can only be defined at the
7+
# repository root directory. Drupal avoids making any assumptions about where it
8+
# is installed.
9+
10+
# Define text file attributes.
11+
# - Treat them as text.
12+
# - Ensure no CRLF line-endings, neither on checkout nor on checkin.
13+
# - Detect whitespace errors.
14+
# - Exposed by default in `git diff --color` on the CLI.
15+
# - Validate with `git diff --check`.
16+
# - Deny applying with `git apply --whitespace=error-all`.
17+
# - Fix automatically with `git apply --whitespace=fix`.
18+
19+
*.config text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
20+
*.css text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
21+
*.dist text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
22+
*.engine text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
23+
*.html text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=html
24+
*.inc text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
25+
*.install text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
26+
*.js text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
27+
*.json text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
28+
*.lock text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
29+
*.map text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
30+
*.md text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
31+
*.module text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
32+
*.php text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
33+
*.po text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
34+
*.profile text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
35+
*.script text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
36+
*.sh text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
37+
*.sql text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
38+
*.svg text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
39+
*.theme text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
40+
*.twig text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
41+
*.txt text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
42+
*.xml text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
43+
*.yml text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
44+
45+
# Define binary file attributes.
46+
# - Do not treat them as text.
47+
# - Include binary diff in patches instead of "binary files differ."
48+
*.eot -text diff
49+
*.exe -text diff
50+
*.gif -text diff
51+
*.gz -text diff
52+
*.ico -text diff
53+
*.jpeg -text diff
54+
*.jpg -text diff
55+
*.otf -text diff
56+
*.phar -text diff
57+
*.png -text diff
58+
*.svgz -text diff
59+
*.ttf -text diff
60+
*.woff -text diff
61+
*.woff2 -text diff

.github/workflows/ddev.yml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: DDEV
2+
on:
3+
push:
4+
branches: [ main ]
5+
pull_request:
6+
branches: [ main ]
7+
8+
jobs:
9+
test:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v1
13+
- uses: jonaseberle/github-action-setup-ddev@v1
14+
- run: ddev phpunit core/modules/action --debug

.github/workflows/lando.yml

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Lando
2+
on:
3+
push:
4+
branches: [ main ]
5+
pull_request:
6+
branches: [ main ]
7+
8+
jobs:
9+
test:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v1
13+
- run: wget https://files.devwithlando.io/lando-stable.deb
14+
- run: sudo dpkg -i --ignore-depends=docker-ce lando-stable.deb
15+
- run: lando start
16+
- run: lando phpunit core/modules/action --debug

.gitignore

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Ignore .lock for this template.
2+
/composer.lock
3+
4+
# Ignore directories generated by Composer
5+
/drush/contrib/
6+
/vendor/
7+
/web/core/
8+
/web/modules/contrib/
9+
/web/themes/contrib/
10+
/web/profiles/contrib/
11+
/web/libraries/
12+
13+
# Ignore local settings overrides.
14+
/web/sites/*/settings.local.php
15+
16+
# Ignore Drupal's file directory
17+
/web/sites/*/files/
18+
19+
# Ignore SimpleTest multi-site environment.
20+
/web/sites/simpletest
21+
22+
# Ignore files generated by PhpStorm
23+
/.idea/
24+
25+
# Ignore .env files as they are personal
26+
/.env
27+
28+
# Prevent private files from being committed.
29+
/private
30+
!/private/README.md
31+
!/private/browser_output/.gitkeep
32+
33+
/phpunit.xml
34+
.phpunit.result.cache
35+
36+
/node_modules

0 commit comments

Comments
 (0)