Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/composer/drupal/workbench_access-…
Browse files Browse the repository at this point in the history
…2.0.2
  • Loading branch information
trackleft authored Jul 5, 2024
2 parents 294f413 + c2fe0f9 commit 0732d64
Show file tree
Hide file tree
Showing 201 changed files with 2,578 additions and 540 deletions.
2 changes: 1 addition & 1 deletion .ddev/commands/web/install
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

rm -rf /var/www/html/*
BRANCH_NAME=$(git -C /usr/local/quickstart-install-profile rev-parse --abbrev-ref HEAD); if [ $(git ls-remote --heads https://github.com/az-digital/az-quickstart-scaffolding.git $BRANCH_NAME | wc -l) = 1 ]; then SCAFFOLD_BRANCH="$BRANCH_NAME"; else SCAFFOLD_BRANCH="main"; fi; git clone --branch $SCAFFOLD_BRANCH https://github.com/az-digital/az-quickstart-scaffolding.git /var/www/html
composer config repositories.localdev path /usr/local/quickstart-install-profile && composer require --no-update drupal/core-recommended:* zaporylie/composer-drupal-optimizations:* az-digital/az_quickstart:\*@dev
composer config repositories.localdev path /usr/local/quickstart-install-profile && composer require --no-update az-digital/az_quickstart:\*@dev
BRANCH_NAME=$(git -C /usr/local/quickstart-install-profile rev-parse --abbrev-ref HEAD); if [ $(git ls-remote --heads https://github.com/az-digital/az-quickstart-dev.git $BRANCH_NAME | wc -l) = 1 ]; then DEV_PACKAGE_BRANCH="$BRANCH_NAME"; else DEV_PACKAGE_BRANCH=main; fi; composer require --no-update --dev az-digital/az-quickstart-dev:dev-${DEV_PACKAGE_BRANCH}
composer install
drush --root=/var/www/html/web site:install [email protected] --account-name=azadmin --account-pass=azadmin2024 --db-url=mysql://db:db@db:3306/db -y --verbose
Expand Down
4 changes: 2 additions & 2 deletions .ddev/config.quickstart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Recipe for AZ Quickstart local development
type: php
docroot: web
php_version: "8.2"
php_version: "8.3"
webserver_type: nginx-fpm

# Default application ports
Expand All @@ -15,7 +15,7 @@ nfs_mount_enabled: false
xdebug_enabled: false
additional_hostnames: []
additional_fqdns: []
mariadb_version: "10.3"
mariadb_version: "10.6"
provider: default
use_dns_when_possible: true
timezone: ""
2 changes: 1 addition & 1 deletion .ddev/docker-compose.override.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ services:
environment:
SIMPLETEST_DB: 'mysql://db:db@db/db'
SIMPLETEST_BASE_URL: 'http://web'
MINK_DRIVER_ARGS_WEBDRIVER: '["chrome", {"browserName":"chrome","chromeOptions":{"args":["--disable-gpu","--disable-dev-shm-usage","--headless","--no-sandbox"]}}, "http://chromedriver:9515"]'
MINK_DRIVER_ARGS_WEBDRIVER: '["chrome", {"browserName":"chrome","goog:chromeOptions":{"args":["--disable-gpu","--disable-dev-shm-usage","--headless","--no-sandbox"]}}, "http://chromedriver:9515"]'
volumes:
# Don't share our host working directory as /var/www/html. We want /var/www/html empty for composer.
- /var/www/html
Expand Down
5 changes: 3 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@
"Shepherd": true,
"Sortable": true,
"once": true,
"CKEDITOR": true,
"CKEditor5": true,
"tabbable": true
"tabbable": true,
"slugify": true,
"bodyScrollLock" : true
},
"rules": {
"prettier/prettier": "error",
Expand Down
15 changes: 15 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,20 @@
## Description
<!--- Describe your changes in detail (include keywords close/fix/resolve) -->

### Release notes
<!--- This section is intended to be deleted if there are no notes. -->

If this change requires release notes: provide a summary of changes, how to
use this change, and any related links. This content will be pasted in the
[release notes](https://github.com/az-digital/az_quickstart/releases). Use
markdown format to ensure proper pasting of information.

Make sure to add the `release notes` label to this PR.

```
Add markdown of release notes here.
```

## Related issues
<!--- This project only accepts pull requests related to open issues -->
<!--- If suggesting a new feature or change, please discuss it in an issue first -->
Expand Down Expand Up @@ -65,3 +79,4 @@
- [ ] I have read the **CONTRIBUTING** document.
- [ ] I have added tests to cover my changes.
- [ ] All new and existing tests passed.
- [ ] My change requires release notes.
2 changes: 1 addition & 1 deletion .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
php-version: '8.3'
- name: Create Tag
run: |
git config user.name github-actions
Expand Down
50 changes: 47 additions & 3 deletions .github/workflows/prepare-for-minor-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
release_branch_name:
description: The name of the new release branch (e.g. 2.9.x) to create.
required: true

jobs:
print_inputs:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -137,14 +137,25 @@ jobs:
.lando.yml
.probo.yaml
composer.json
update_previous_release_branches:
needs: [prepare_for_new_minor_release, branch_name_prep]
runs-on: ubuntu-latest
name: Update `${{ matrix.previous_version }}` release branch.
strategy:
matrix:
previous_version: [2.9.x, 2.8.x, 2.7.x, 2.6.x, 2.5.x, 2.4.x, 2.3.x, 2.2.x, 2.1.x, 2.0.x]
previous_version:
- 2.0.x
- 2.1.x
- 2.2.x
- 2.3.x
- 2.4.x
- 2.5.x
- 2.6.x
- 2.7.x
- 2.8.x
- 2.9.x
- 2.10.x
steps:
- name: Update previous release branch `${{ matrix.previous_version }}`
uses: actions/checkout@v4
Expand Down Expand Up @@ -174,3 +185,36 @@ jobs:
${{ matrix.previous_version }} only
add-paths: |
composer.json
update_composer_dev_branch_alias_on_main_branch:
needs: [prepare_for_new_minor_release, branch_name_prep]
runs-on: ubuntu-latest
name: Update the composer dev branch alias on the `main` branch.
steps:
- name: Update `main` branch with new minor release branch alias.
uses: actions/checkout@v4
with:
ref: main
token: ${{ secrets.REPO_DISPATCH_TOKEN }}

- name: Set up Git
run: |
git config user.name "GitHub Action"
git config user.email "[email protected]"
- name: Update dev branch alias via Composer
run: |
composer config extra.branch-alias.dev-main ${{ needs.branch_name_prep.outputs.next_minor_release }}.x-dev
- name: Create pull request for main branch updates
uses: peter-evans/create-pull-request@v6
with:
title: Prepare `main` branch for new minor release branch ${{ inputs.release_branch_name }}
commit-message: Prepare `main` branch for new minor release branch ${{ inputs.release_branch_name }}
branch: update-main-for-${{ inputs.release_branch_name }}
base: main
labels: |
task
delete-branch: true
token: ${{ secrets.REPO_DISPATCH_TOKEN }}
add-paths: |
composer.json
6 changes: 3 additions & 3 deletions .github/workflows/review-site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
php-version: '8.3'

- name: Install Terminus and authenticate Terminus
uses: pantheon-systems/terminus-github-actions@release/v1
Expand All @@ -35,7 +35,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
php-version: '8.3'

- name: Set up SSH
run: |
Expand Down Expand Up @@ -71,7 +71,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
php-version: '8.3'

- name: Set up SSH
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
php-version: '8.3'
- name: Find the push source branch name
if: ${{ github.event_name != 'pull_request' }}
run: echo "AZ_TRIMMED_REF=${GITHUB_REF#refs/*/}" >> ${GITHUB_ENV}
Expand Down Expand Up @@ -62,7 +62,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
php-version: '8.3'
- name: Find the push source branch name
if: ${{ github.event_name != 'pull_request' }}
run: echo "AZ_TRIMMED_REF=${GITHUB_REF#refs/*/}" >> ${GITHUB_ENV}
Expand Down
12 changes: 6 additions & 6 deletions .lando.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
name: az_quickstart
recipe: drupal10
config:
php: '8.2'
php: '8.3'
via: apache:2.4
webroot: web
database: mariadb:10.4
database: mariadb:10.6
xdebug: false
services:
# Replaces default lando MariaDB image with arm64 (Apple M1) compatible one.
# TODO: remove database service overrides once lando is updated.
database:
type: compose
services:
image: mariadb:10.4
image: mariadb:10.6
command: docker-entrypoint.sh mariadbd
restart: always
ports:
Expand All @@ -30,7 +30,7 @@ services:
environment:
SIMPLETEST_DB: 'mysql://drupal10:drupal10@database/drupal10'
SIMPLETEST_BASE_URL: 'http://appserver'
MINK_DRIVER_ARGS_WEBDRIVER: '["chrome", {"browserName":"chrome","chromeOptions":{"args":["--disable-gpu","--disable-dev-shm-usage","--headless","--no-sandbox"],"w3c":false}},"http://chromedriver:4444/wd/hub"]'
MINK_DRIVER_ARGS_WEBDRIVER: '["chrome", {"browserName":"chrome","goog:chromeOptions":{"args":["--disable-gpu","--disable-dev-shm-usage","--headless","--no-sandbox"],"w3c":false}},"http://chromedriver:4444/wd/hub"]'
XDEBUG_MODE: debug
volumes:
# Don't share our host working directory as /app. We want /app empty for composer.
Expand All @@ -41,13 +41,13 @@ services:
# Create a new quickstart project and use the installation profile as a non-packagist repository.
# Use the matching scaffolding branch if available.
- BRANCH_NAME=$(git -C /usr/local/quickstart-install-profile rev-parse --abbrev-ref HEAD); if [ $(git ls-remote --heads https://github.com/az-digital/az-quickstart-scaffolding.git $BRANCH_NAME | wc -l) = 1 ]; then SCAFFOLD_BRANCH="$BRANCH_NAME"; else SCAFFOLD_BRANCH="main"; fi; git clone --branch $SCAFFOLD_BRANCH https://github.com/az-digital/az-quickstart-scaffolding.git /app
- composer config repositories.localdev path /usr/local/quickstart-install-profile && composer require --no-update drupal/core-recommended:* zaporylie/composer-drupal-optimizations:* az-digital/az_quickstart:\*@dev
- composer config repositories.localdev path /usr/local/quickstart-install-profile && composer require --no-update az-digital/az_quickstart:\*@dev
# Use the matching require-dev metapackage branch if available.
- BRANCH_NAME=$(git -C /usr/local/quickstart-install-profile rev-parse --abbrev-ref HEAD); if [ $(git ls-remote --heads https://github.com/az-digital/az-quickstart-dev.git $BRANCH_NAME | wc -l) = 1 ]; then DEV_PACKAGE_BRANCH="$BRANCH_NAME"; else DEV_PACKAGE_BRANCH=main; fi; composer require --no-update --dev az-digital/az-quickstart-dev:dev-${DEV_PACKAGE_BRANCH}
- composer install
- ln -s /usr/local/quickstart-install-profile/.vscode /app/.vscode
node:
type: node:18
type: node:20
build:
- yarn install
chromedriver:
Expand Down
20 changes: 14 additions & 6 deletions .probo.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
image: proboci/ubuntu:22.04-php8.2
image: proboci/ubuntu:22.04-php8.3
assets:
- test-credentials.sh
- migration.settings.php
Expand All @@ -15,7 +15,7 @@ steps:
- cd az-quickstart-scaffolding
- composer config repositories.az_quickstart vcs https://github.com/az-digital/az_quickstart.git
- composer config use-github-api false
- composer require --no-update drupal/core-recommended:* zaporylie/composer-drupal-optimizations:* az-digital/az_quickstart:dev-${BRANCH_NAME}
- composer require --no-update az-digital/az_quickstart:dev-${BRANCH_NAME}
- composer require --no-update --dev az-digital/az-quickstart-dev:dev-${DEV_PACKAGE_BRANCH}
- composer install -o
- name: Run PHP_CodeSniffer coding standards checks
Expand All @@ -32,7 +32,7 @@ steps:
- sudo npm cache clean -f --silent --no-progress
- sudo npm install -g --no-progress yarn
- sudo npm install -g --no-progress n
- sudo n 18.12.1
- sudo n 20.13.0
- cd $SRC_DIR/az-quickstart-scaffolding/web/profiles/custom/az_quickstart
- yarn install
- yarn run eslint --color .
Expand Down Expand Up @@ -69,7 +69,7 @@ steps:
- chown www-data:www-data -R /var/www/html/sites/default/files
- $SRC_DIR/az-quickstart-scaffolding/vendor/bin/drush -y -n pm:install environment_indicator
- chmod 777 /var/www/html/sites/default/settings.php
- echo -e "\$config['environment_indicator.indicator']['name'] = '$BRANCH_NAME (ProboCI)';\n\$config['environment_indicator.indicator']['bg_color'] = '#440027';\n\$config['environment_indicator.indicator']['fg_color'] = '#ffffff';" >> /var/www/html/sites/default/settings.php
- echo -e "\$config['environment_indicator.indicator']['name'] = '$BRANCH_NAME (ProboCI)';\n\$config['environment_indicator.indicator']['bg_color'] = '#440027';" >> /var/www/html/sites/default/settings.php
- chmod 444 /var/www/html/sites/default/settings.php
- name: Check for PHP errors and notices
plugin: Script
Expand Down Expand Up @@ -113,13 +113,21 @@ steps:
- source $ASSET_DIR/test-credentials.sh
- export SIMPLETEST_BASE_URL="http://localhost"
- export SIMPLETEST_DB="mysql://${TEST_DATABASE_USER}:${TEST_DATABASE_PASS}@localhost/${TEST_DATABASE_NAME}"
- export MINK_DRIVER_ARGS_WEBDRIVER='["chrome", {"browserName":"chrome","chromeOptions":{"args":["--disable-gpu","--disable-dev-shm-usage","--headless","--no-sandbox"]}}, "http://localhost:9515"]'
- export MINK_DRIVER_ARGS_WEBDRIVER='["chrome", {"browserName":"chrome","goog:chromeOptions":{"args":["--disable-gpu","--disable-dev-shm-usage","--headless","--no-sandbox"]}}, "http://localhost:9515"]'
- daemonize /usr/local/bin/chromedriver --log-path=/tmp/chromedriver.log --verbose --whitelisted-ips="127.0.0.1"
- cd /var/www/html/profiles/custom/az_quickstart
- export RUN_TESTS_CONCURRENCY=10
- mysqladmin create ${TEST_DATABASE_NAME}
- sudo -u www-data -E find $SRC_DIR/az-quickstart-scaffolding/web/profiles/custom/az_quickstart/ -name "*Test.php" | sudo -u www-data -E $SRC_DIR/az-quickstart-scaffolding/vendor/bin/fastest -p 10 -vvv "$SRC_DIR/az-quickstart-scaffolding/vendor/bin/phpunit {} --colors="always" --verbose --do-not-cache-result;"
- name: Log in to terminus
- name: Install Terminus
plugin: Script
script:
- mkdir -p ~/terminus && cd ~/terminus
- curl -L https://github.com/pantheon-systems/terminus/releases/download/3.4.0/terminus.phar --output terminus
- chmod +x terminus
- ./terminus self:update
- ln -sf ~/terminus/terminus /usr/local/bin/terminus
- name: Log in to Terminus
command: 'source ${ASSET_DIR}/terminus.sh; terminus auth:login --machine-token=${TERMINUS_TOKEN}'
- name: Migration Tests
plugin: Script
Expand Down
1 change: 0 additions & 1 deletion az_quickstart.info.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ install:
- drupal:file
- drupal:views
- drupal:views_ui
- drupal:tour
- drupal:automated_cron
- drupal:google_tag
- block_class:block_class
Expand Down
8 changes: 1 addition & 7 deletions az_quickstart.install
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ use Drupal\Core\Link;
use Drupal\Core\Render\Markup;
use Drupal\Core\Url;
use Drupal\shortcut\Entity\Shortcut;
use Drupal\user\Entity\User;

/**
* Implements hook_install().
Expand All @@ -20,11 +19,6 @@ use Drupal\user\Entity\User;
* @see system_install()
*/
function az_quickstart_install() {
// Assign user 1 the "administrator" role.
$user = User::load(1);
$user->roles[] = 'administrator';
$user->save();

// Populate the default shortcut set.
$shortcut = Shortcut::create([
'shortcut_set' => 'default',
Expand Down Expand Up @@ -79,7 +73,7 @@ function az_quickstart_requirements($phase) {

// Gather all deprecated modules that are enabled.
$azqs_deprecated_modules = [
'block_content_permissions',
'ctools',
];
$enabled_deprecated_modules = [];
$enabled_modules = \Drupal::moduleHandler()->getModuleList();
Expand Down
Loading

0 comments on commit 0732d64

Please sign in to comment.