Skip to content

Commit

Permalink
4.4.0
Browse files Browse the repository at this point in the history
4.4.0
  • Loading branch information
joegl authored May 16, 2024
2 parents 6210f8a + fd266e5 commit 2d43401
Show file tree
Hide file tree
Showing 162 changed files with 8,264 additions and 2,519 deletions.
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@
*.xml text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
*.yml text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2

# PHPStan's baseline uses tabs instead of spaces.
core/.phpstan-baseline.php text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tabwidth=2 diff=php linguist-language=php

# Define binary file attributes.
# - Do not treat them as text.
# - Include binary diff in patches instead of "binary files differ."
Expand Down
28 changes: 11 additions & 17 deletions .github/workflows/deploy_branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,41 +10,35 @@ jobs:
deploy:
name: Deploy Artifact
runs-on: ubuntu-latest
env:
DRUPAL_DATABASE_NAME: drupal
DRUPAL_DATABASE_USERNAME: drupal
DRUPAL_DATABASE_PASSWORD: drupal
DRUPAL_DATABASE_HOST: mysql
container:
image: pookmish/drupal8ci:latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Restore Cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
vendor
docroot/core
docroot/libraries
docroot/modules/contrib
key: 4.x-20240206-${{ hashFiles('composer.json') }}-${{ hashFiles('composer.lock') }}
key: 4.x-${{ hashFiles('blt/blt.yml') }}-${{ hashFiles('composer.json') }}-${{ hashFiles('composer.lock') }}
restore-keys: |
4.x-20240206-${{ hashFiles('composer.json') }}-${{ hashFiles('composer.lock') }}
4.x-20240206-${{ hashFiles('composer.json') }}-
4.x-20240206-
4.x-${{ hashFiles('blt/blt.yml') }}-${{ hashFiles('composer.json') }}-${{ hashFiles('composer.lock') }}
4.x-${{ hashFiles('blt/blt.yml') }}-${{ hashFiles('composer.json') }}-
4.x-${{ hashFiles('blt/blt.yml') }}-
- name: Install SSH key
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.ACQUIA_SSH_KEY }}
name: id_rsa
known_hosts: ${{ secrets.KNOWN_HOSTS }}
if_key_exists: fail
- run: git config --system --add safe.directory '*'
- name: Deploy Artifact
run: |
git config --global user.email "[email protected]"
git config --global user.name "Github Actions"
ssh-keyscan -t rsa svn-23450.prod.hosting.acquia.com >> /root/.ssh/known_hosts
composer install -n
blt blt:telemetry:disable --no-interaction
git config --system --add safe.directory '*' &&
git config --global user.email "[email protected]" &&
git config --global user.name "Github Actions" &&
ssh-keyscan -t rsa svn-23450.prod.hosting.acquia.com >> /root/.ssh/known_hosts &&
composer install -n &&
blt deploy -v -n
2 changes: 1 addition & 1 deletion .github/workflows/label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
pr-labeler:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: codelytv/pr-size-labeler@v1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
74 changes: 74 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# .github/workflows/release.yml
# This workflow automates the release and production deploy process.
#
# When a release branch is merged into the main branch it:
# - Creates a new tag and release
# - Creates a code artifact and pushes it to Acquia for deployment
name: Release

on:
pull_request:
types: [ closed ]

jobs:
build:
runs-on: ubuntu-latest
permissions: write-all
if: github.event.pull_request.merged
container:
image: pookmish/drupal8ci:latest
steps:
- name: Get Next Release
id: tag
uses: K-Phoen/semver-release-action@master
with:
release_strategy: none
release_branch: main
tag_format: "%major%.%minor%.%patch%"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Creating new release for ${{ steps.tag.outputs.tag }}
if: ${{ steps.tag.outputs.tag }}
uses: ncipollo/release-action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
name: ${{ steps.tag.outputs.tag }}
tag: ${{ steps.tag.outputs.tag }}
commit: ${{ github.sha }}
generateReleaseNotes: true
makeLatest: true
- name: Install SSH key
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.ACQUIA_SSH_KEY }}
name: id_rsa
known_hosts: ${{ secrets.KNOWN_HOSTS }}
if_key_exists: fail
- uses: actions/checkout@v4
if: ${{ steps.tag.outputs.tag }}
with:
ref: ${{ github.sha }}
- name: Restore Cache
if: ${{ steps.tag.outputs.tag }}
uses: actions/cache@v4
with:
path: |
vendor
docroot/core
docroot/libraries
docroot/modules/contrib
key: 4.x-${{ hashFiles('blt/blt.yml') }}-${{ hashFiles('composer.json') }}-${{ hashFiles('composer.lock') }}
restore-keys: |
4.x-${{ hashFiles('blt/blt.yml') }}-${{ hashFiles('composer.json') }}-${{ hashFiles('composer.lock') }}
4.x-${{ hashFiles('blt/blt.yml') }}-${{ hashFiles('composer.json') }}-
4.x-${{ hashFiles('blt/blt.yml') }}-
- name: Deploy Tag
if: ${{ steps.tag.outputs.tag }}
run: |
git config --system --add safe.directory '*' &&
git config --global user.email "[email protected]" &&
git config --global user.name "Github Actions" &&
ssh-keyscan -t rsa svn-23450.prod.hosting.acquia.com >> /root/.ssh/known_hosts &&
composer install -n &&
blt deploy --tag=$(date +'%Y-%m-%d')"_"${{ steps.tag.outputs.tag }} --commit-msg=${{ steps.tag.outputs.tag }} --no-interaction
18 changes: 0 additions & 18 deletions .github/workflows/tag_commits_to_main.yml

This file was deleted.

149 changes: 73 additions & 76 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,16 @@ name: PHPUnit and Acceptance Tests
# Allow this workflow to be called from other workflows.
on: [workflow_call]

# Cancel previous runs of this workflow in the same branch if they're still in
# progress.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
phpunit:
name: PHPUnit Coverage Tests
runs-on: ubuntu-latest
env:
DRUPAL_DATABASE_NAME: drupal
DRUPAL_DATABASE_USERNAME: drupal
DRUPAL_DATABASE_PASSWORD: drupal
DRUPAL_DATABASE_HOST: mysql
container:
image: pookmish/drupal8ci:latest
services:
Expand All @@ -28,36 +29,38 @@ jobs:
- 33306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Restore Cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
vendor
docroot/core
docroot/libraries
docroot/modules/contrib
key: 4.x-20240206-${{ hashFiles('composer.json') }}-${{ hashFiles('composer.lock') }}
key: 4.x-${{ hashFiles('blt/blt.yml') }}-${{ hashFiles('composer.json') }}-${{ hashFiles('composer.lock') }}
restore-keys: |
4.x-20240206-${{ hashFiles('composer.json') }}-${{ hashFiles('composer.lock') }}
4.x-20240206-${{ hashFiles('composer.json') }}-
4.x-20240206-
- run: git config --system --add safe.directory '*'
4.x-${{ hashFiles('blt/blt.yml') }}-${{ hashFiles('composer.json') }}-${{ hashFiles('composer.lock') }}
4.x-${{ hashFiles('blt/blt.yml') }}-${{ hashFiles('composer.json') }}-
4.x-${{ hashFiles('blt/blt.yml') }}-
- name: Run Unit Tests
# env:
# CC_TEST_REPORTER_ID: ${{secrets.CC_TEST_REPORTER_ID}}
run: |
composer install -n
blt blt:telemetry:disable --no-interaction
git config --system --add safe.directory '*' &&
composer install -n &&
blt tests:phpunit:coverage --no-interaction
- name: Save Test Results
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: failure()
with:
name: unit-tests-results
path: $GITHUB_WORKSPACE/artifacts
acceptance:
name: Codeception Acceptance Tests
test_new_site:
name: Test New Site
strategy:
matrix:
suite: [acceptance, functional]
runs-on: ubuntu-latest
env:
DRUPAL_DATABASE_NAME: drupal
Expand All @@ -66,7 +69,11 @@ jobs:
DRUPAL_DATABASE_HOST: mysql
container:
image: pookmish/drupal8ci:latest
options: '--network-alias drupal8ci'
services:
selenium:
image: selenium/standalone-chrome:latest
options: '--shm-size="2g"'
mysql:
image: mysql:5.7
env:
Expand All @@ -78,53 +85,55 @@ jobs:
- 33306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Restore Cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
vendor
docroot/core
docroot/libraries
docroot/modules/contrib
key: 4.x-20231101-${{ hashFiles('composer.json') }}-${{ hashFiles('composer.lock') }}
key: 4.x-${{ hashFiles('blt/blt.yml') }}-${{ hashFiles('composer.json') }}-${{ hashFiles('composer.lock') }}
restore-keys: |
4.x-20231101-${{ hashFiles('composer.json') }}-${{ hashFiles('composer.lock') }}
4.x-20231101-${{ hashFiles('composer.json') }}-
4.x-20231101-
- run: git config --system --add safe.directory '*'
- name: Run tests
4.x-${{ hashFiles('blt/blt.yml') }}-${{ hashFiles('composer.json') }}-${{ hashFiles('composer.lock') }}
4.x-${{ hashFiles('blt/blt.yml') }}-${{ hashFiles('composer.json') }}-
4.x-${{ hashFiles('blt/blt.yml') }}-
- name: Install Site
run: |
rm -rf /var/www/html
ln -snf $GITHUB_WORKSPACE /var/www/html
apachectl stop
apachectl start
composer install -n
blt blt:telemetry:disable --no-interaction
blt drupal:install -n
drush role:perm:add anonymous 'access content'
drush xmlsitemap:rebuild
blt codeception --suite=acceptance
git config --system --add safe.directory '*' &&
rm -rf /var/www/html &&
ln -snf $GITHUB_WORKSPACE /var/www/html &&
apachectl stop &&
apachectl start &&
composer install -n &&
blt drupal:install -n &&
drush role:perm:add anonymous 'access content' &&
drush xmlsitemap:rebuild &&
mkdir -p artifacts/_data/
- name: Run tests
run: blt codeception --suite=${{ matrix.suite }}
- name: Save Test Results
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: always()
with:
name: acceptance-tests-results
name: newsite-${{ matrix.suite }}-tests
path: artifacts
functional:
name: Codeception Functional Tests
test_sustainability_sync:
name: Test Sustainability Site Sync
runs-on: ubuntu-latest
container:
image: pookmish/drupal8ci:latest
options: '--network-alias drupal8ci'
env:
DRUPAL_DATABASE_NAME: drupal
DRUPAL_DATABASE_USERNAME: drupal
DRUPAL_DATABASE_PASSWORD: drupal
DRUPAL_DATABASE_HOST: mysql
container:
image: pookmish/drupal8ci:latest
options: '--network-alias drupal8ci'
STANFORD_ENCRYPT: ${{secrets.STANFORD_ENCRYPT}}
services:
selenium:
image: selenium/standalone-chrome:115.0
image: selenium/standalone-chrome:latest
options: '--shm-size="2g"'
mysql:
image: mysql:5.7
Expand All @@ -137,45 +146,33 @@ jobs:
- 33306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- uses: actions/checkout@v3
- name: Install SSH key
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.ACQUIA_SSH_KEY }}
name: id_rsa
known_hosts: ${{ secrets.KNOWN_HOSTS }}
if_key_exists: fail
- uses: actions/checkout@v4
- name: Restore Cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
vendor
docroot/core
docroot/libraries
docroot/modules/contrib
docroot/modules/custom
key: 4.x-20231101-${{ hashFiles('composer.json') }}-${{ hashFiles('composer.lock') }}
key: 4.x-${{ hashFiles('blt/blt.yml') }}-${{ hashFiles('composer.json') }}-${{ hashFiles('composer.lock') }}
restore-keys: |
4.x-20231101-${{ hashFiles('composer.json') }}-${{ hashFiles('composer.lock') }}
4.x-20231101-${{ hashFiles('composer.json') }}-
4.x-20231101-
- run: git config --system --add safe.directory '*'
- name: Install Site
4.x-${{ hashFiles('blt/blt.yml') }}-${{ hashFiles('composer.json') }}-${{ hashFiles('composer.lock') }}
4.x-${{ hashFiles('blt/blt.yml') }}-${{ hashFiles('composer.json') }}-
4.x-${{ hashFiles('blt/blt.yml') }}-
- name: Sync Database
run: |
rm -rf /var/www/html
ln -snf $GITHUB_WORKSPACE /var/www/html
apachectl stop
apachectl start
composer install -n
blt blt:telemetry:disable --no-interaction
blt drupal:install -n
drush role:perm:add anonymous 'access content'
drush xmlsitemap:rebuild
mkdir -p artifacts/_data/
- name: Run tests
run: blt codeception --suite=functional
- name: Save Test Results
uses: actions/upload-artifact@v3
if: always()
with:
name: functional-tests-results
path: artifacts

# Cancel previous runs of this workflow in the same branch if they're still in
# progress.
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
git config --system --add safe.directory '*' &&
mysql -h mysql -P 3306 -u root -pdrupal -e 'SET GLOBAL max_allowed_packet=67108864;' &&
rm -rf /var/www/html &&
ln -snf $GITHUB_WORKSPACE /var/www/html &&
composer install -n &&
blt settings &&
blt drupal:sync --site=sustainability -n
Loading

0 comments on commit 2d43401

Please sign in to comment.