Skip to content

Commit

Permalink
Update theme and packages
Browse files Browse the repository at this point in the history
Signed-off-by: James Hunt <[email protected]>
  • Loading branch information
thetwopct committed Jun 28, 2024
1 parent f691d04 commit 70ae0ba
Show file tree
Hide file tree
Showing 300 changed files with 90,373 additions and 207,373 deletions.
229 changes: 229 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,229 @@
# https://circleci.com/docs/2.0/workflows/#using-workspaces-to-share-data-among-jobs
defaults: &defaults
docker:
- image: quay.io/pantheon-public/build-tools-ci:6.x
working_directory: ~/example_wordpress_composer
environment:
#=========================================================================
# In addition to the environment variables defined in this file, also
# add the following variables in the Circle CI UI.
#
# See: https://circleci.com/docs/2.0/environment-variables/
#
# TERMINUS_SITE: Name of the Pantheon site to run tests on, e.g. my_site.
# TERMINUS_TOKEN: The Pantheon machine token.
# GITHUB_TOKEN: The GitHub personal access token.
# GIT_EMAIL: The email address to use when making commits.
#
# TEST_SITE_NAME: The name of the test site to provide when installing.
# ADMIN_PASSWORD: The admin password to use when installing.
# ADMIN_EMAIL: The email address to give the admin when installing.
#=========================================================================
TZ: "/usr/share/zoneinfo/America/Los_Angeles"

# The variables below usually do not need to be modified.

#======================================================================================================================================
# Circle CI 2.0 does not yet expand environment variables so they have to be manually EXPORTed
# Once environment variables can be expanded the variables below can be uncommented and the EXPORTs in set-up-globals.sh can be removed
# See: https://discuss.circleci.com/t/unclear-how-to-work-with-user-variables-circleci-provided-env-variables/12810/11
# See: https://discuss.circleci.com/t/environment-variable-expansion-in-working-directory/11322
# See: https://discuss.circleci.com/t/circle-2-0-global-environment-variables/8681
#======================================================================================================================================
# See set-up-globals.sh for more environment variables

NOTIFY: 'scripts/github/add-commit-comment {project} {sha} "Created multidev environment [{site}#{env}]({dashboard-url})." {site-url}'
ADMIN_USERNAME: admin
# BUILD_TOOLS_VERSION: 2.0.0-beta6
TERM: dumb

version: 2.1
orbs:
slack: circleci/[email protected]

jobs:
# @todo: common initialization, maybe
build:
<<: *defaults
# override the default image with drupaldocker/php as this job
# doesn't need Pantheon specific items such as Terminus that are
# in the quay.io/pantheon-public/build-tools-ci image
docker:
- image: drupaldocker/php:7.2-cli
auth:
username: $DOCKERHUB_USERNAME
password: $DOCKERHUB_PASSWORD

steps:
- checkout

- restore_cache:
keys:
- composer-cache

- run:
name: install dev dependencies
command: composer install --no-ansi --no-interaction --optimize-autoloader --no-progress

- save_cache:
key: composer-cache
paths:
- $HOME/.composer/cache

- persist_to_workspace:
# Must be relative path from working_directory
root: .
# Must be relative path from root
paths:
- vendor

- slack/status:
fail_only: true

code_sniff_unit_test:
<<: *defaults
# override the default image with drupaldocker/php as this job
# doesn't need Pantheon specific items such as Terminus that are
# in the quay.io/pantheon-public/build-tools-ci image
docker:
- image: drupaldocker/php:7.2-cli
auth:
username: $DOCKERHUB_USERNAME
password: $DOCKERHUB_PASSWORD

steps:
- checkout

- attach_workspace:
# Must be absolute path or relative path from working_directory
at: /tmp

- run:
name: copy vendor/web
command: cp -r /tmp/vendor .

- run:
name: check for WordPress coding standards
command: composer -n code-sniff

- slack/status:
fail_only: true

build_css_js:
<<: *defaults
docker:
- image: cimg/node:20.12.2
auth:
username: $DOCKERHUB_USERNAME
password: $DOCKERHUB_PASSWORD

resource_class: large

steps:
- checkout

- run:
name: Check current version of node
command: node -v

- run:
name: compile css/js
command: 'cd $HOME/example_wordpress_composer/web/wp-content/themes/lfevents/; npm install; npm run build'

- persist_to_workspace:
root: web/wp-content/themes/lfevents
paths:
- dist

- slack/status:
fail_only: true

build_and_deploy_lfeventsci:
<<: *defaults
steps:
- checkout

- restore_cache:
keys:
- composer-cache
- terminus-install

- attach_workspace:
at: /tmp

- run:
name: copy dist
command: cp -r /tmp/dist $HOME/example_wordpress_composer/web/wp-content/themes/lfevents/

- run:
name: dependencies
command: ./.circleci/set-up-globals.sh

- run:
name: build assets
command: composer -n build-assets

- run:
name: deploy to Pantheon
command: ./.circleci/deploy-to-pantheon.sh $TERMINUS_SITE

- slack/status:
success_message: "$COMMIT_AUTHOR's *$CIRCLE_JOB* job has succeeded \n- $COMMIT_HASH: $COMMIT_MESSAGE"
failure_message: "$COMMIT_AUTHOR's *$CIRCLE_JOB* job has failed \n- $COMMIT_HASH: $COMMIT_MESSAGE"

build_and_deploy_lfasiallcci:
<<: *defaults
steps:
- checkout

- restore_cache:
keys:
- composer-cache
- terminus-install

- attach_workspace:
at: /tmp

- run:
name: copy dist
command: cp -r /tmp/dist $HOME/example_wordpress_composer/web/wp-content/themes/lfevents/

- run:
name: dependencies
command: ./.circleci/set-up-globals.sh

- run:
name: build assets
command: composer -n build-assets

- run:
name: deploy to Pantheon
command: ./.circleci/deploy-to-pantheon.sh $TERMINUS_SITE2

- slack/status:
success_message: "$COMMIT_AUTHOR's *$CIRCLE_JOB* job has succeeded \n- $COMMIT_HASH: $COMMIT_MESSAGE"
failure_message: "$COMMIT_AUTHOR's *$CIRCLE_JOB* job has failed \n- $COMMIT_HASH: $COMMIT_MESSAGE"

run_percy_tests_lfeventsci:
<<: *defaults
steps:
- checkout

- run:
name: Percy tests
command: ./.circleci/percy-tests.sh $TERMINUS_SITE

workflows:
build_and_test:
jobs:
- build
- build_css_js
- build_and_deploy_lfeventsci:
requires:
- build_css_js
- build_and_deploy_lfasiallcci:
requires:
- build_css_js
- code_sniff_unit_test:
requires:
- build
40 changes: 20 additions & 20 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,26 +26,26 @@
"roots/wp-password-bcrypt": "^1.0.0",
"rvtraveller/qs-composer-installer": "^1.1",
"vlucas/phpdotenv": "^5.5.0",
"wpackagist-plugin/autodescription": "^5",
"wpackagist-plugin/china-video-block": "^0.2.0",
"wpackagist-plugin/clone-page-tree": "^0.1.0",
"wpackagist-plugin/find-my-blocks": "^4",
"wpackagist-plugin/flying-pages": "^2.0.8",
"wpackagist-plugin/safe-svg":"2.2.4",
"wpackagist-plugin/flying-scripts": "^1.1.7",
"wpackagist-plugin/leadin": "*",
"wpackagist-plugin/pantheon-advanced-page-cache": "^2",
"wpackagist-plugin/photonic": "^3.02",
"wpackagist-plugin/post-meta-controls": "^1.2.0",
"wpackagist-plugin/post-type-switcher": "^3.1.0",
"wpackagist-plugin/publishpress-checklists": "^2.5.3",
"wpackagist-plugin/redirection": "^5",
"wpackagist-plugin/shortpixel-image-optimiser": "*",
"wpackagist-plugin/simple-history": "^4.1.0",
"wpackagist-plugin/svg-autocrop": "^0.1.0",
"wpackagist-plugin/wp-mail-smtp": "^4",
"wpackagist-plugin/wp-native-php-sessions": "^1.0.0",
"wpackagist-plugin/wp-nested-pages": "^3.2.4"
"wpackagist-plugin/autodescription": "^5.0",
"wpackagist-plugin/china-video-block": "^0.2.5",
"wpackagist-plugin/clone-page-tree": "^0.1.2",
"wpackagist-plugin/find-my-blocks": "^4.0",
"wpackagist-plugin/flying-pages": "^2.4",
"wpackagist-plugin/flying-scripts": "^1.2",
"wpackagist-plugin/leadin": "^11.1",
"wpackagist-plugin/pantheon-advanced-page-cache": "^2.0",
"wpackagist-plugin/photonic": "^3.10",
"wpackagist-plugin/post-meta-controls": "^1.4",
"wpackagist-plugin/post-type-switcher": "^3.3",
"wpackagist-plugin/publishpress-checklists": "^2.10",
"wpackagist-plugin/redirection": "^5.4",
"wpackagist-plugin/safe-svg": "^2.2",
"wpackagist-plugin/shortpixel-image-optimiser": "^5.6",
"wpackagist-plugin/simple-history": "^4.15",
"wpackagist-plugin/svg-autocrop": "^0.1.2",
"wpackagist-plugin/wp-mail-smtp": "^4.0",
"wpackagist-plugin/wp-native-php-sessions": "^1.4",
"wpackagist-plugin/wp-nested-pages": "^3.2"
},
"require-dev": {
"roave/security-advisories": "dev-master",
Expand Down
20 changes: 10 additions & 10 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions phpcs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,19 @@

<file>./web/wp-content/themes/</file>
<file>./web/wp-content/mu-plugins/custom/</file>
<file>./web/wp-content/plugins/buttons-with-expiry/</file>
<file>./web/wp-content/plugins/core-block-customisations/</file>
<file>./web/wp-content/plugins/countdown-block/</file>
<file>./web/wp-content/plugins/custom-iframe/</file>
<file>./web/wp-content/plugins/icon-list/</file>
<file>./web/wp-content/plugins/image-box/</file>
<file>./web/wp-content/plugins/live-stream-gate-block/</file>
<file>./web/wp-content/plugins/pricing-block/</file>
<file>./web/wp-content/plugins/speakers-block/</file>
<file>./web/wp-content/plugins/sponsors-dynamic-block/</file>
<file>./web/wp-content/plugins/tab-container-block/</file>
<file>./web/wp-content/plugins/text-on-image-block/</file>
<file>./web/wp-content/plugins/track-grid/</file>

<exclude-pattern>*/node_modules/*</exclude-pattern>
<exclude-pattern>*/vendor/*</exclude-pattern>
Expand Down
Loading

0 comments on commit 70ae0ba

Please sign in to comment.