Skip to content

Commit

Permalink
Issue #638: Updates for Drupal 11 (#639)
Browse files Browse the repository at this point in the history
- Replace sserbin/twig-linter with vincentlanglet/twig-cs-fixer/ - sserbin/twig-linter depends on an old version of symfony/console and core is adopting this new package at some point https://www.drupal.org/project/drupal/issues/3284817 - it also has a much better extension mechanism which will help if something like Fix linting for Storybook #615 comes up again
- Update Pantheon settings for Drupal 11
- Update PHPUnit configurations and tests for Drupal 11
- Fix mysterious yarn issues with DDEV
  • Loading branch information
justafish authored Aug 13, 2024
1 parent d0bcec0 commit 84d3711
Show file tree
Hide file tree
Showing 25 changed files with 362 additions and 236 deletions.
11 changes: 10 additions & 1 deletion .github/workflows/TestBinaryInstaller.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,18 @@ concurrency:
jobs:
Test-Binary-Installer:
runs-on: ubuntu-22.04
strategy:
matrix:
php-version: [ 8.1, 8.2, 8.3 ]
include:
- php-version: 8.1
drupal-version: ":^10"
- php-version: 8.2
drupal-version: ":^10"
steps:

- name: Create a Drupal project
run: composer create-project drupal/recommended-project . --ignore-platform-req=ext-gd
run: composer create-project drupal/recommended-project${{ matrix.drupal-version }} . --ignore-platform-reqs

- uses: actions/checkout@v4
with:
Expand All @@ -37,6 +45,7 @@ jobs:
- name: Setup Project
run: |
ddev config --auto
ddev config --php-version ${{ matrix.php-version }}
ddev start
ddev composer config extra.drupal-scaffold.gitignore true
ddev composer config --json extra.drupal-scaffold.allowed-packages '["lullabot/drainpipe-dev", "lullabot/drainpipe"]'
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/TestComposerLockDiff.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,12 @@ concurrency:
jobs:
Test-Composer-Lock-Diff:
runs-on: ubuntu-22.04
strategy:
matrix:
drupal-version: [ 10, 11 ]
steps:
- name: Create a Drupal project
run: composer create-project drupal/recommended-project:10.0.9 . --ignore-platform-req=ext-gd
run: composer create-project drupal/recommended-project:^${{ matrix.drupal-version }} . --ignore-platform-reqs

- uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -77,7 +80,7 @@ jobs:
if: ${{ always() }}
uses: actions/upload-artifact@v4
with:
name: processed-descriptions
name: processed-descriptions-${{ matrix.drupal-version }}
path: |
renovate-processed.json
pr-template-processed.json
6 changes: 4 additions & 2 deletions .github/workflows/TestDDEV.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,12 @@ concurrency:
jobs:
Test-DDEV-Install:
runs-on: ubuntu-22.04
strategy:
matrix:
drupal-version: [ 10, 11 ]
steps:
- name: Create a Drupal project
run: composer create-project drupal/recommended-project . --ignore-platform-req=ext-gd
run: composer create-project drupal/recommended-project:^${{ matrix.drupal-version }} . --ignore-platform-reqs

- uses: actions/checkout@v4
with:
Expand All @@ -35,7 +38,6 @@ jobs:
- name: Setup Project
run: |
ddev config --auto
ddev config --nodejs-version "18"
ddev start
ddev composer config extra.drupal-scaffold.gitignore true
ddev composer config --json extra.drupal-scaffold.allowed-packages '["lullabot/drainpipe-dev", "lullabot/drainpipe"]'
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/TestEnv.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,13 @@ concurrency:
jobs:
Test-Env:
runs-on: ubuntu-22.04
strategy:
matrix:
drupal-version: [ 10, 11 ]
steps:
- name: Create a Drupal project
run: |
composer create-project drupal/recommended-project . --ignore-platform-req=ext-gd
composer create-project drupal/recommended-project:^${{ matrix.drupal-version }} . --ignore-platform-reqs
- uses: actions/checkout@v4
with:
Expand Down
62 changes: 42 additions & 20 deletions .github/workflows/TestFunctional.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,12 @@ concurrency:
jobs:
Build:
runs-on: ubuntu-22.04
strategy:
matrix:
drupal-version: [ 10, 11 ]
steps:
- name: Create a Drupal project
run: composer create-project drupal/recommended-project . --ignore-platform-req=ext-gd
run: composer create-project drupal/recommended-project:^${{ matrix.drupal-version }} . --ignore-platform-reqs

- uses: actions/checkout@v4
with:
Expand All @@ -35,7 +38,8 @@ jobs:
- name: Setup Project
run: |
ddev config --auto
ddev config --nodejs-version "18"
ddev config --nodejs-version "22"
ddev config --corepack-enable
ddev start
ddev composer config extra.drupal-scaffold.gitignore true
ddev composer config --json extra.drupal-scaffold.allowed-packages '["lullabot/drainpipe-dev", "lullabot/drainpipe"]'
Expand Down Expand Up @@ -64,16 +68,19 @@ jobs:
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: test-functional-build
name: test-functional-build-${{ matrix.drupal-version }}
path: /tmp/drainpipe.zip

Test-NPM:
runs-on: ubuntu-22.04
needs: Build
strategy:
matrix:
drupal-version: [ 10, 11 ]
steps:
- uses: actions/download-artifact@v4
with:
name: test-functional-build
name: test-functional-build-${{ matrix.drupal-version }}

- name: Restore Workspace
run: |
Expand Down Expand Up @@ -112,16 +119,19 @@ jobs:
if: ${{ always() }}
uses: actions/upload-artifact@v4
with:
name: test_result-npm
name: test_result-npm-${{ matrix.drupal-version }}
path: test_result

Test-Yarn-Classic:
runs-on: ubuntu-22.04
needs: Build
strategy:
matrix:
drupal-version: [ 10, 11 ]
steps:
- uses: actions/download-artifact@v4
with:
name: test-functional-build
name: test-functional-build-${{ matrix.drupal-version }}

- name: Restore Workspace
run: |
Expand All @@ -143,7 +153,9 @@ jobs:

- name: Setup Nightwatch
run: |
ddev yarn set version classic
ddev exec corepack disable
ddev exec npm i -g yarn@1.22.1
ddev exec 'ln -s $(npm root -g)/yarn/bin/yarn /usr/local/bin/yarn'
ddev yarn init -y
ddev yarn add nightwatch nightwatch-accessibility @lullabot/nightwatch-drupal-commands lodash --dev
Expand All @@ -161,16 +173,19 @@ jobs:
if: ${{ always() }}
uses: actions/upload-artifact@v4
with:
name: test_result-yarn-classic
name: test_result-yarn-classic-${{ matrix.drupal-version }}
path: test_result

Test-Yarn-3-Node-Linker:
runs-on: ubuntu-22.04
needs: Build
strategy:
matrix:
drupal-version: [ 10, 11 ]
steps:
- uses: actions/download-artifact@v4
with:
name: test-functional-build
name: test-functional-build-${{ matrix.drupal-version }}

- name: Restore Workspace
run: |
Expand All @@ -195,7 +210,7 @@ jobs:
ddev yarn set version berry
ddev yarn set version 3
ddev yarn init -y
yarn config set nodeLinker node-modules
ddev yarn config set nodeLinker node-modules
ddev yarn add nightwatch nightwatch-accessibility @lullabot/nightwatch-drupal-commands lodash --dev
- name: Install Drupal
Expand All @@ -212,16 +227,19 @@ jobs:
if: ${{ always() }}
uses: actions/upload-artifact@v4
with:
name: test_result-yarn3-nl
name: test_result-yarn3-nl-${{ matrix.drupal-version }}
path: test_result

Test-Yarn-4-Node-Linker:
runs-on: ubuntu-22.04
needs: Build
strategy:
matrix:
drupal-version: [ 10, 11 ]
steps:
- uses: actions/download-artifact@v4
with:
name: test-functional-build
name: test-functional-build-${{ matrix.drupal-version }}

- name: Restore Workspace
run: |
Expand All @@ -243,12 +261,11 @@ jobs:

- name: Setup Nightwatch
run: |
ddev config --nodejs-version=21
ddev restart
ddev yarn set version berry
ddev yarn set version 4
ddev yarn init -y
yarn config set nodeLinker node-modules
ddev yarn config set nodeLinker node-modules
ddev yarn add nightwatch nightwatch-accessibility @lullabot/nightwatch-drupal-commands lodash --dev
- name: Install Drupal
Expand All @@ -265,16 +282,19 @@ jobs:
if: ${{ always() }}
uses: actions/upload-artifact@v4
with:
name: test_result-yarn4-nl
name: test_result-yarn4-nl-${{ matrix.drupal-version }}
path: test_result

Test-Yarn-3:
runs-on: ubuntu-22.04
needs: Build
strategy:
matrix:
drupal-version: [ 10, 11 ]
steps:
- uses: actions/download-artifact@v4
with:
name: test-functional-build
name: test-functional-build-${{ matrix.drupal-version }}

- name: Restore Workspace
run: |
Expand Down Expand Up @@ -319,16 +339,19 @@ jobs:
if: ${{ always() }}
uses: actions/upload-artifact@v4
with:
name: test_result-yarn3
name: test_result-yarn3-${{ matrix.drupal-version }}
path: test_result

Test-Yarn-4:
runs-on: ubuntu-22.04
needs: Build
strategy:
matrix:
drupal-version: [ 10, 11 ]
steps:
- uses: actions/download-artifact@v4
with:
name: test-functional-build
name: test-functional-build-${{ matrix.drupal-version }}

- name: Restore Workspace
run: |
Expand All @@ -350,7 +373,6 @@ jobs:

- name: Setup Nightwatch
run: |
ddev config --nodejs-version=21
ddev restart
ddev yarn set version berry
ddev yarn init -y
Expand All @@ -375,5 +397,5 @@ jobs:
if: ${{ always() }}
uses: actions/upload-artifact@v4
with:
name: test_result-yarn4
name: test_result-yarn4-${{ matrix.drupal-version }}
path: test_result
9 changes: 4 additions & 5 deletions .github/workflows/TestGitHubActions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Create a Drupal project
run: composer create-project drupal/recommended-project . --ignore-platform-req=ext-gd
run: composer create-project drupal/recommended-project . --ignore-platform-reqs

- uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -58,10 +58,9 @@ jobs:
run: |
echo "api_version: 1" >> pantheon.yml
echo "web_docroot: true" >> pantheon.yml
echo "php_version: 8.1" >> pantheon.yml
echo "drush_version: 10" >> pantheon.yml
echo "php_version: 8.3" >> pantheon.yml
echo "database:" >> pantheon.yml
echo " version: 10.4" >> pantheon.yml
echo " version: 10.6" >> pantheon.yml
echo "enforce_https: full+subdomains" >> pantheon.yml
echo "build_step: false" >> pantheon.yml
Expand All @@ -78,7 +77,7 @@ jobs:
echo "\$settings['container_yamls'][] = __DIR__ . '/services.yml';" >> web/sites/default/settings.php
echo "include __DIR__ . \"/settings.pantheon.php\";" >> web/sites/default/settings.php
echo "\$settings['config_sync_directory'] = '../config';" >> web/sites/default/settings.php
curl -o web/sites/default/settings.pantheon.php https://raw.githubusercontent.com/pantheon-systems/drops-8/default/sites/default/settings.pantheon.php
curl -o web/sites/default/settings.pantheon.php https://raw.githubusercontent.com/pantheon-systems/drupal-integrations/11.x/assets/settings.pantheon.php
- name: Snapshot Project
env:
Expand Down
25 changes: 14 additions & 11 deletions .github/workflows/TestMetapackages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Create a Drupal project
run: composer create-project drupal/recommended-project . --ignore-platform-req=ext-gd
run: composer create-project drupal/recommended-project . --ignore-platform-reqs

- uses: actions/checkout@v4
with:
Expand All @@ -35,7 +35,8 @@ jobs:
- name: Setup Project
run: |
ddev config --auto
ddev config --nodejs-version "18"
ddev config --nodejs-version "22"
ddev config --corepack-enable
ddev start
ddev composer config extra.drupal-scaffold.gitignore true
ddev composer config --json extra.drupal-scaffold.allowed-packages '["lullabot/drainpipe-dev", "lullabot/drainpipe"]'
Expand Down Expand Up @@ -126,9 +127,11 @@ jobs:

- name: Setup Sass
run: |
ddev yarn set version classic
ddev yarn init -y
ddev yarn add file:./drainpipe/metapackages/sass --dev
ddev exec corepack disable
ddev exec npm i -g yarn@1.22.1
ddev exec 'ln -s $(npm root -g)/yarn/bin/yarn /usr/local/bin/yarn'
ddev exec yarn init -y
ddev exec yarn add file:./drainpipe/metapackages/sass --dev
- name: Compile Sass
run: ddev task sass
Expand Down Expand Up @@ -197,7 +200,6 @@ jobs:

- name: Setup Sass
run: |
ddev config --nodejs-version=21
ddev restart
ddev yarn set version berry
ddev yarn set version 4
Expand Down Expand Up @@ -271,10 +273,12 @@ jobs:

- name: Setup Sass
run: |
ddev yarn set version classic
ddev yarn init -y
ddev yarn add focus-trap@^6.7.3
ddev yarn add file:./drainpipe/metapackages/javascript --dev
ddev exec corepack disable
ddev exec npm i -g yarn@1.22.1
ddev exec 'ln -s $(npm root -g)/yarn/bin/yarn /usr/local/bin/yarn'
ddev exec yarn init -y
ddev exec yarn add focus-trap@^6.7.3
ddev exec yarn add file:./drainpipe/metapackages/javascript --dev
- name: Compile JavaScript
run: ddev task javascript
Expand Down Expand Up @@ -344,7 +348,6 @@ jobs:

- name: Setup Sass
run: |
ddev config --nodejs-version=21
ddev restart
ddev yarn set version berry
ddev yarn set version 4
Expand Down
Loading

0 comments on commit 84d3711

Please sign in to comment.