Skip to content

Commit

Permalink
Merge tag 'v3.12.0' into 172--global-binaries
Browse files Browse the repository at this point in the history
  • Loading branch information
elvism-lullabot committed Feb 13, 2025
2 parents d31f9d5 + fc52958 commit 5b6ef3c
Show file tree
Hide file tree
Showing 51 changed files with 9,659 additions and 806 deletions.
49 changes: 35 additions & 14 deletions .github/workflows/DrainpipeDev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,43 +16,64 @@ permissions:

jobs:
Drainpipe-Dev:
name: Push branch to drainpipe-dev
name: Push to drainpipe-dev
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Add drainpipe-dev deploy key in order to run git clone
- uses: ./scaffold/github/actions/common/setup-git
with:
git-name: Drainpipe Bot
git-email: no-reply@example.com

- name: Setup SSH
uses: webfactory/ssh-agent@v0.9.0
with:
ssh-private-key: ${{ secrets.DRAINPIPE_DEV_DEPLOY_KEY }}
log-public-key: false

# Commits made by the https://github.com/apps/lullabot-drainpipe application.
# @see https://github.com/orgs/community/discussions/24664
- name: Create git checkout of drainpipe-dev
working-directory: drainpipe-dev
run: |
git init
git branch -m ${{ github.ref_name }}
git remote add origin git@github.com:Lullabot/drainpipe-dev.git
git fetch origin
git reset --mixed origin/${{ github.ref_name }} || git reset --mixed origin/main
git config user.name "Lullabot-Drainpipe[bot]"
git config user.email "157769597+Lullabot-Drainpipe[bot]@users.noreply.github.com"
- name: Push branch to drainpipe-dev
- name: Commit changes (Tag)
if: ${{ startsWith(github.ref, 'refs/tags/') }}
working-directory: drainpipe-dev
run: |
git reset --mixed origin/main
git add -A
git commit -m "$COMMIT_MESSAGE" --allow-empty
git push origin ${{ github.ref_name }}
env:
# Workaround if the commit message contains quotes.
COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
git commit -m "${{ github.ref_name }}" --allow-empty
- name: Commit changes (Branch)
if: ${{ ! startsWith(github.ref, 'refs/tags/') }}
working-directory: drainpipe-dev
run: |
git reset --mixed origin/${{ github.ref_name }} || git reset --mixed origin/main
git add -A
git commit -m "${{ github.event.head_commit.message }}" --allow-empty
- name: Push tag to drainpipe-dev
- name: Tag release
if: ${{ startsWith(github.ref, 'refs/tags/') }}
working-directory: drainpipe-dev
run: |
git tag ${{ github.ref_name }}
- name: Push to drainpipe-dev
working-directory: drainpipe-dev
run: |
git push origin ${{ github.ref_name }}
- name: Create release
if: ${{ startsWith(github.ref, 'refs/tags/') }}
run: |
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.DRAINPIPE_DEV_RELEASE_TOKEN }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/lullabot/drainpipe-dev/releases \
-d '{"tag_name":"${{ github.ref_name }}","name":"${{ github.ref_name }}","body":"See <a href=\"https://github.com/Lullabot/drainpipe/releases/tag/${{ github.ref_name }}\">https://github.com/Lullabot/drainpipe/releases/tag/${{ github.ref_name }}</a>","draft":false,"prerelease":false,"generate_release_notes":false}'
11 changes: 6 additions & 5 deletions .github/workflows/DrainpipeDevClean.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,17 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Add drainpipe-dev deploy key in order to run git clone
- uses: ./scaffold/github/actions/common/setup-git
with:
git-name: Drainpipe Bot
git-email: no-reply@example.com

- name: Setup SSH
uses: webfactory/ssh-agent@v0.9.0
with:
ssh-private-key: ${{ secrets.DRAINPIPE_DEV_DEPLOY_KEY }}
log-public-key: false

# Commits made by the https://github.com/apps/lullabot-drainpipe application.
# @see https://github.com/orgs/community/discussions/24664
- name: Create git checkout of drainpipe-dev
working-directory: drainpipe-dev
run: |
Expand All @@ -32,8 +35,6 @@ jobs:
git remote add origin git@github.com:Lullabot/drainpipe-dev.git
git fetch origin
git reset --mixed origin/${{ github.event.ref }}
git config user.name "Lullabot-Drainpipe[bot]"
git config user.email "157769597+Lullabot-Drainpipe[bot]@users.noreply.github.com"
- name: Delete ref from drainpipe-dev
working-directory: drainpipe-dev
Expand Down
15 changes: 15 additions & 0 deletions .github/workflows/TestBinaryInstaller.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,18 @@ jobs:
rm -rf vendor
ddev composer install --no-cache
test -x vendor/bin/task
- name: Prove we can upgrade task within task
run: |
cp -a drainpipe/tests/fixtures/drainpipe-task-upgrade .
cp -a drainpipe drainpipe-task-upgrade
cd drainpipe-task-upgrade
ddev start
ddev composer install
ddev task drupal:composer:development
cp composer-upgraded.json composer.json
cp composer-upgraded.lock composer.lock
# Composer won't run updated plugin code until after its been
# installed. Once we have two new releases after 3.11.0, that upgrade
# task, we can remove this double call.
ddev task drupal:composer:development || ddev task drupal:composer:development
59 changes: 33 additions & 26 deletions .github/workflows/TestFunctional.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,20 @@ jobs:
ddev composer config minimum-stability dev
ddev composer require "lullabot/drainpipe @dev" --with-all-dependencies
ddev composer require "lullabot/drainpipe-dev @dev" --dev --with-all-dependencies
git config --global user.email "no-reply@example.com"
git config --global user.name "Drainpipe Bot"
git init
echo "/drainpipe" >> .gitignore
echo "/drainpipe-dev" >> .gitignore
echo ".ddev/config.yaml" >> .gitignore
echo ".ddev/docker-compose.selenium.yaml" >> .gitignore
echo ".yarnrc.yml" >> .gitignore
echo "package.json" >> .gitignore
echo "yarn.lock" >> .gitignore
echo "package-lock.json" >> .gitignore
echo "README.md" >> .gitignore
git add .
git commit -m "Initial commit"
- name: Setup Nightwatch
run: |
Expand All @@ -62,6 +76,11 @@ jobs:
ddev config --web-environment="NIGHTWATCH_DRUPAL_URL_FIREFOX=https://drupal_firefox,NIGHTWATCH_DRUPAL_URL_CHROME=https://drupal_chrome"
ddev config --additional-hostnames="*.drainpipe"
- name: Run the site installer
run: |
ddev drush --yes site:install minimal
ddev drush config:export --yes
- name: Create Artifact
run: zip -r /tmp/drainpipe.zip ./

Expand Down Expand Up @@ -107,10 +126,7 @@ jobs:
- name: Install Drupal
run: |
ddev drush --yes site:install
ddev drush --uri=https://drupal_firefox --yes site:install
ddev drush --uri=https://drupal_chrome --yes site:install
ddev drush config:export --yes
ddev task test:siteinstall:all
- name: Run Functional Tests
run: ddev task test:functional
Expand Down Expand Up @@ -161,10 +177,7 @@ jobs:
- name: Install Drupal
run: |
ddev drush --yes site:install
ddev drush --uri=https://drupal_firefox --yes site:install
ddev drush --uri=https://drupal_chrome --yes site:install
ddev drush config:export --yes
ddev task test:siteinstall:all
- name: Run Functional Tests
run: ddev task test:functional
Expand Down Expand Up @@ -215,10 +228,7 @@ jobs:
- name: Install Drupal
run: |
ddev drush --yes site:install
ddev drush --uri=https://drupal_firefox --yes site:install
ddev drush --uri=https://drupal_chrome --yes site:install
ddev drush config:export --yes
ddev task test:siteinstall:all
- name: Run Functional Tests
run: ddev task test:functional
Expand Down Expand Up @@ -270,10 +280,7 @@ jobs:
- name: Install Drupal
run: |
ddev drush --yes site:install
ddev drush --uri=https://drupal_firefox --yes site:install
ddev drush --uri=https://drupal_chrome --yes site:install
ddev drush config:export --yes
ddev task test:siteinstall:all
- name: Run Functional Tests
run: ddev task test:functional
Expand Down Expand Up @@ -323,14 +330,14 @@ jobs:
echo ' "nightwatch@*":' >> .yarnrc.yml
echo ' dependencies:' >> .yarnrc.yml
echo ' ws: "*"' >> .yarnrc.yml
ddev yarn add nightwatch nightwatch-axe-verbose @lullabot/nightwatch-drupal-commands --dev
echo ' "@nightwatch/vrt@*":' >> .yarnrc.yml
echo ' dependencies:' >> .yarnrc.yml
echo ' open: "^8"' >> .yarnrc.yml
ddev yarn add nightwatch nightwatch-axe-verbose @nightwatch/vrt @lullabot/nightwatch-drupal-commands --dev
- name: Install Drupal
run: |
ddev drush --yes site:install
ddev drush --uri=https://drupal_firefox --yes site:install
ddev drush --uri=https://drupal_chrome --yes site:install
ddev drush config:export --yes
ddev task test:siteinstall:all
- name: Run Functional Tests
run: ddev task test:functional
Expand Down Expand Up @@ -380,15 +387,15 @@ jobs:
echo ' "nightwatch@*":' >> .yarnrc.yml
echo ' dependencies:' >> .yarnrc.yml
echo ' ws: "*"' >> .yarnrc.yml
echo ' "@nightwatch/vrt@*":' >> .yarnrc.yml
echo ' dependencies:' >> .yarnrc.yml
echo ' open: "^8"' >> .yarnrc.yml
ddev yarn cache clear
ddev yarn add nightwatch nightwatch-axe-verbose @lullabot/nightwatch-drupal-commands --dev
ddev yarn add nightwatch nightwatch-axe-verbose @nightwatch/vrt @nightwatch/vrt @lullabot/nightwatch-drupal-commands --dev
- name: Install Drupal
run: |
ddev drush --yes site:install
ddev drush --uri=https://drupal_firefox --yes site:install
ddev drush --uri=https://drupal_chrome --yes site:install
ddev drush config:export --yes
ddev task test:siteinstall:all
- name: Run Functional Tests
run: ddev task test:functional
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/TestGitHubActions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,12 @@ jobs:
ddev composer config --no-plugins allow-plugins.composer/installers true
ddev composer config --no-plugins allow-plugins.drupal/core-composer-scaffold true
ddev composer config --no-plugins allow-plugins.lullabot/drainpipe true
ddev composer config --no-plugins allow-plugins.lullabot/drainpipe-dev true
ddev composer config repositories.drainpipe --json '{"type": "path", "url": "drainpipe", "options": {"symlink": false}}'
ddev composer config repositories.drainpipe-dev --json '{"type": "path", "url": "drainpipe/drainpipe-dev", "options": {"symlink": false}}'
ddev composer config minimum-stability dev
ddev composer require lullabot/drainpipe --with-all-dependencies
ddev composer require --dev lullabot/drainpipe-dev --with-all-dependencies
- name: Install Drupal
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/TestPHPUnit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ jobs:
ddev composer config repositories.drainpipe-dev --json '{"type": "path", "url": "drainpipe-dev", "options": {"symlink": false}}'
ddev composer config minimum-stability dev
ddev composer require "lullabot/drainpipe @dev" --with-all-dependencies
ddev composer require "lullabot/drainpipe-dev @dev" weitzman/drupal-test-traits behat/mink-selenium2-driver --dev --with-all-dependencies
ddev composer require "lullabot/drainpipe-dev @dev" weitzman/drupal-test-traits lullabot/mink-selenium2-driver --dev --with-all-dependencies
# Restart is required to enable the provided Selenium containers
ddev restart
Expand Down
24 changes: 24 additions & 0 deletions .github/workflows/TestStatic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,34 @@ jobs:
test -f phpcs.xml.dist
test -f phpstan.neon.dist
- name: Create a git repository
run: |
git config --global user.email "no-reply@example.com"
git config --global user.name "Drainpipe Bot"
git init
echo "/drainpipe" >> .gitignore
echo "/drainpipe-dev" >> .gitignore
git add .
git commit -m "Initial commit"
- name: Fix settings.php
run: |
sed -i '/^.*container_yamls.*$/i /** @phpstan-ignore-next-line */' web/sites/default/settings.php
- name: Test for untracked and modified files
id: test_untracked
continue-on-error: true
run: ddev task test:untracked

- name: Test for untracked and modified files
run: |
if [ "${{ steps.test_untracked.outcome }}" != "failure" ]; then
exit 1
fi
git add .
git commit -m "Second commit"
ddev task test:untracked
- name: Run Static Tests
run: ddev task test:static

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/TestTugboat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ jobs:
echo " - foo" >> .tugboat/config.drainpipe-override.yml
echo " urls:" >> .tugboat/config.drainpipe-override.yml
echo " - /" >> .tugboat/config.drainpipe-override.yml
echo " - /?v=1" >> .tugboat/config.drainpipe-override.yml
echo " screenshot:" >> .tugboat/config.drainpipe-override.yml
echo " timeout: 45" >> .tugboat/config.drainpipe-override.yml
echo " visualdiff:" >> .tugboat/config.drainpipe-override.yml
Expand Down
1 change: 1 addition & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ build:
- ddev composer require lullabot/drainpipe --with-all-dependencies
- ddev restart
- test -f .gitlab/drainpipe/DDEV.gitlab-ci.yml
- test -f .gitlab/drainpipe/Nightwatch.gitlab-ci.yml
- ddev drush site:install minimal -y
- echo "\$settings['config_sync_directory'] = '../config';" >> web/sites/default/settings.php
- ddev drush config:export -y
Expand Down
Loading

0 comments on commit 5b6ef3c

Please sign in to comment.