Skip to content

Commit

Permalink
Merge branch 'release/1.8.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexSkrypnyk committed Jul 1, 2024
2 parents c4ed948 + 4391855 commit 2e3c62e
Show file tree
Hide file tree
Showing 288 changed files with 32,199 additions and 6,705 deletions.
2 changes: 0 additions & 2 deletions .ahoy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,6 @@ commands:
lint-be:
usage: Lint back-end code.
cmd: |
ahoy cli "cd web/themes/contrib/${DRUPAL_THEME} && BUILD_DIR=/app DRUPAL_ROOT=/app/web .devtools/lint.sh"
ahoy cli vendor/bin/phpcs
ahoy cli vendor/bin/phpstan
ahoy cli vendor/bin/rector process --dry-run --clear-cache
Expand All @@ -182,7 +181,6 @@ commands:
lint-fix:
usage: Fix lint issues of back-end and front-end code.
cmd: |
ahoy cli "cd web/themes/contrib/${DRUPAL_THEME} && BUILD_DIR=/app DRUPAL_ROOT=/app/web .devtools/lint-fix.sh"
ahoy cli vendor/bin/rector --clear-cache
ahoy cli vendor/bin/phpcbf
Expand Down
169 changes: 132 additions & 37 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ aliases:
DEPLOY_SSH_FINGERPRINT4: *deploy_ssh_fingerprint4
GIT_MIRROR_SSH_FINGERPRINT: *git_mirror_ssh_fingerprint
docker:
- image: drevops/ci-runner:24.3.0
- image: drevops/ci-runner:24.4.0
auth:
username: $DOCKER_USER
password: $DOCKER_PASS
Expand Down Expand Up @@ -102,7 +102,7 @@ aliases:
- &step_setup_remote_docker
setup_remote_docker:
docker_layer_caching: *docker_layer_caching
version: 20.10.18
version: default

# Set up Docker network.
- &step_setup_docker_network
Expand All @@ -127,20 +127,89 @@ aliases:
# Reusable job configuration.
job-build-isolated: &job-build-isolated
steps:
# Workspace now contains previously built application code artifact.
- attach_workspace:
at: /tmp/workspace
- checkout
- run: cd web/themes/contrib/civictheme && ./.devtools/build.sh
- run: cd web/themes/contrib/civictheme && ./.devtools/lint.sh
- run: cd web/themes/contrib/civictheme && ./.devtools/test.sh

- run:
command: cd web/themes/contrib/civictheme && ./.devtools/process-artifacts.sh
when: always
name: Upgrade sqlite3
command: |
wget https://www.sqlite.org/2024/sqlite-autoconf-3450300.tar.gz -O /tmp/sqlite.tar.gz
tar -xzf /tmp/sqlite.tar.gz -C /tmp
cd /tmp/sqlite-autoconf-3450300
./configure CFLAGS="-DSQLITE_ENABLE_COLUMN_METADATA=1" --prefix=/usr/local
make && sudo make install
sudo ldconfig
echo "export LD_LIBRARY_PATH=/usr/local/lib" >> $BASH_ENV
- run:
name: Install PCOV
command: |
sudo pecl install pcov
echo "extension=pcov.so" | sudo tee -a /usr/local/etc/php/conf.d/pcov.ini
echo "pcov.enabled=1" | sudo tee -a /usr/local/etc/php/conf.d/pcov.ini
- run:
name: Assemble the codebase
command: .devtools/assemble.sh
working_directory: web/themes/contrib/civictheme

- run:
name: Start built-in PHP server
command: .devtools/start.sh
working_directory: web/themes/contrib/civictheme

- run:
name: Provision site
command: .devtools/provision.sh
working_directory: web/themes/contrib/civictheme

- run:
name: Lint code with PHPCS
command: vendor/bin/phpcs || [ "${CI_PHPCS_IGNORE_FAILURE:-0}" -eq 1 ]
working_directory: web/themes/contrib/civictheme/build

- run:
name: Lint code with PHPStan
command: vendor/bin/phpstan || [ "${CI_PHPSTAN_IGNORE_FAILURE:-0}" -eq 1 ]
working_directory: web/themes/contrib/civictheme/build

- run:
name: Lint code with Rector
command: vendor/bin/rector --clear-cache --dry-run || [ "${CI_RECTOR_IGNORE_FAILURE:-0}" -eq 1 ]
working_directory: web/themes/contrib/civictheme/build

- run:
name: Lint code with PHPMD
command: vendor/bin/phpmd . text phpmd.xml || [ "${CI_PHPMD_IGNORE_FAILURE:-0}" -eq 1 ]
working_directory: web/themes/contrib/civictheme/build

- run:
name: Lint code with Twig CS Fixer
command: vendor/bin/twig-cs-fixer || [ "${CI_TWIGCSFIXER_IGNORE_FAILURE:-0}" -eq 1 ]
working_directory: web/themes/contrib/civictheme/build

- run:
name: Run tests
command: vendor/bin/phpunit || [ "${CI_TEST_IGNORE_FAILURE:-0}" -eq 1 ]
working_directory: web/themes/contrib/civictheme/build
environment:
BROWSERTEST_OUTPUT_DIRECTORY: /tmp

- store_test_results:
path: /tmp/test_results
path: web/themes/contrib/civictheme/.logs/test_results

- store_artifacts:
path: /tmp/artifacts
path: web/themes/contrib/civictheme/build/web/sites/simpletest/browser_output

- store_artifacts:
path: web/themes/contrib/civictheme/.logs/coverage

- run:
name: Upload code coverage reports to Codecov
command: |
if [ -z "${CIRCLE_TAG-}" ] && [ -n "${CODECOV_TOKEN-}" ] && [ -d .logs/coverage/phpunit ]; then
curl -Os https://cli.codecov.io/latest/linux/codecov && sudo chmod +x codecov
./codecov --verbose upload-process --fail-on-error -n "circleci-$CIRCLE_JOB" -s web/themes/contrib/civictheme/.logs/coverage
fi
job-build: &job-build
parallelism: 2
Expand Down Expand Up @@ -221,34 +290,49 @@ jobs:

# Isolated theme build within a vanilla Drupal installation.
# This replicates (to a degree) what Drupal CI would do.
build-isolated-php-81:
build-isolated-php-82:
<<: *runner_config
docker:
- image: cimg/php:8.1-browsers
- image: cimg/php:8.2-browsers
environment:
DRUPAL_VERSION: 10.1
DRUPAL_PROJECT_SHA: 10.x
<<: *job-build-isolated

build-isolated-php-82:
build-isolated-php-82-legacy:
<<: *runner_config
docker:
- image: cimg/php:8.2-browsers
environment:
DRUPAL_VERSION: 10.1
DRUPAL_PROJECT_SHA: 10.x
<<: *job-build-isolated

build-isolated-php-81-legacy:
build-isolated-php-82-next:
<<: *runner_config
docker:
- image: cimg/php:8.1-browsers
- image: cimg/php:8.2-browsers
environment:
DRUPAL_VERSION: 10.1
DRUPAL_PROJECT_SHA: a1bb2c4dd1e54ce6b9170dc666e6d543474dd57b
DRUPAL_VERSION: 10@beta
DRUPAL_PROJECT_SHA: 10.x
<<: *job-build-isolated

build-isolated-php-82-legacy:
build-isolated-php-83:
<<: *runner_config
docker:
- image: cimg/php:8.2-browsers
- image: cimg/php:8.3-browsers
environment:
DRUPAL_VERSION: 10.1
DRUPAL_PROJECT_SHA: a1bb2c4dd1e54ce6b9170dc666e6d543474dd57b
DRUPAL_VERSION: stable
DRUPAL_PROJECT_SHA: 10.x
<<: *job-build-isolated

build-isolated-php-83-next:
<<: *runner_config
docker:
- image: cimg/php:8.3-browsers
environment:
DRUPAL_VERSION: 10@beta
DRUPAL_PROJECT_SHA: 10.x
<<: *job-build-isolated

# Used to pass the built code down the pipeline.
Expand Down Expand Up @@ -435,80 +519,91 @@ workflows:
# Commit workflow. Runs for every commit push to the remote repository.
commit:
jobs:
- build-isolated-php-81:
- build-isolated-php-82:
filters:
branches:
ignore: /^content\/.*/
tags:
only: /.*/
- build-isolated-php-82:
- build-isolated-php-82-legacy:
filters:
branches:
ignore: /^content\/.*/
tags:
only: /.*/
- build-isolated-php-81-legacy:
- build-isolated-php-82-next:
filters:
branches:
ignore: /^content\/.*/
tags:
only: /.*/
- build-isolated-php-82-legacy:
- build-isolated-php-83:
filters:
branches:
ignore: /^content\/.*/
tags:
only: /.*/
- build-isolated-php-83-next:
filters:
branches:
ignore: /^content\/.*/
tags:
only: /.*/
- build-minimal:
requires:
- build-isolated-php-81
- build-isolated-php-81-legacy
- build-isolated-php-82
- build-isolated-php-82-legacy
- build-isolated-php-82-next
- build-isolated-php-83
- build-isolated-php-83-next
filters:
branches:
ignore: /^content\/.*/
tags:
only: /.*/
- build-minimal-subtheme:
requires:
- build-isolated-php-81
- build-isolated-php-81-legacy
- build-isolated-php-82
- build-isolated-php-82-legacy
- build-isolated-php-82-next
- build-isolated-php-83
- build-isolated-php-83-next
filters:
branches:
ignore: /^content\/.*/
tags:
only: /.*/
- build-govcms:
requires:
- build-isolated-php-81
- build-isolated-php-81-legacy
- build-isolated-php-82
- build-isolated-php-82-legacy
- build-isolated-php-82-next
- build-isolated-php-83
- build-isolated-php-83-next
filters:
branches:
ignore: /^content\/.*/
tags:
only: /.*/
- build-govcms-subtheme:
requires:
- build-isolated-php-81
- build-isolated-php-81-legacy
- build-isolated-php-82
- build-isolated-php-82-legacy
- build-isolated-php-82-next
- build-isolated-php-83
- build-isolated-php-83-next
filters:
branches:
ignore: /^content\/.*/
tags:
only: /.*/
- build-govcms-subtheme-sibling:
requires:
- build-isolated-php-81
- build-isolated-php-81-legacy
- build-isolated-php-82
- build-isolated-php-82-legacy
- build-isolated-php-82-next
- build-isolated-php-83
- build-isolated-php-83-next
filters:
branches:
ignore: /^content\/.*/
Expand Down
2 changes: 1 addition & 1 deletion .docker/cli.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# @see https://github.com/uselagoon/lagoon-images/tree/main/images/php-cli-drupal
#
# hadolint global ignore=DL3018
FROM uselagoon/php-8.2-cli-drupal:24.2.0
FROM uselagoon/php-8.2-cli-drupal:24.5.1

# Add missing variables.
# @todo Remove once https://github.com/uselagoon/lagoon/issues/3121 is resolved.
Expand Down
2 changes: 1 addition & 1 deletion .docker/cli.onlytheme.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# @see https://github.com/uselagoon/lagoon-images/tree/main/images/php-cli-drupal
#
# hadolint global ignore=DL3018
FROM uselagoon/php-8.2-cli-drupal:24.2.0
FROM uselagoon/php-8.2-cli-drupal:24.5.1

# Add missing variables.
# @todo Remove once https://github.com/uselagoon/lagoon/issues/3121 is resolved.
Expand Down
2 changes: 1 addition & 1 deletion .docker/cli.sibling.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# @see https://github.com/uselagoon/lagoon-images/tree/main/images/php-cli-drupal
#
# hadolint global ignore=DL3018
FROM uselagoon/php-8.2-cli-drupal:24.2.0
FROM uselagoon/php-8.2-cli-drupal:24.5.1

# Add missing variables.
# @todo Remove once https://github.com/uselagoon/lagoon/issues/3121 is resolved.
Expand Down
2 changes: 1 addition & 1 deletion .docker/mariadb.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# @see https://github.com/drevops/mariadb-drupal-data
#
# The ARG value will be updated with a value passed from docker-compose.yml
ARG IMAGE=uselagoon/mariadb-drupal:24.2.0
ARG IMAGE=uselagoon/mariadb-drupal:24.5.1

# hadolint ignore=DL3006
FROM ${IMAGE}
Expand Down
2 changes: 1 addition & 1 deletion .docker/nginx-drupal.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ FROM ${CLI_IMAGE:-cli} as cli

# @see https://hub.docker.com/r/uselagoon/nginx-drupal/tags?page=1
# @see https://github.com/uselagoon/lagoon-images/tree/main/images/nginx-drupal
FROM uselagoon/nginx-drupal:24.2.0
FROM uselagoon/nginx-drupal:24.5.1

# Webroot is used for Nginx docroot configuration.
ARG WEBROOT=web
Expand Down
2 changes: 1 addition & 1 deletion .docker/php.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ FROM ${CLI_IMAGE:-cli} as cli

# @see https://hub.docker.com/r/uselagoon/php-8.2-fpm/tags
# @see https://github.com/uselagoon/lagoon-images/tree/main/images/php-fpm
FROM uselagoon/php-8.2-fpm:24.2.0
FROM uselagoon/php-8.2-fpm:24.5.1

RUN apk add --no-cache tzdata

Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@

### Content profiles

- [Corporate](https://nginx-php.content-corporate.monorepo-drupal.lagoon.salsa.hosting/)
- [Government](https://nginx-php.content-government.monorepo-drupal.lagoon.salsa.hosting/)
- [Higher Education](https://nginx-php.content-highereducation.monorepo-drupal.lagoon.salsa.hosting/)
- [Corporate](https://nginx-php.content-corporate.civictheme-monorepo-drupal.lagoon.salsa.hosting/)
- [Government](https://nginx-php.content-government.civictheme-monorepo-drupal.lagoon.salsa.hosting/)
- [Higher Education](https://nginx-php.content-highereducation.civictheme-monorepo-drupal.lagoon.salsa.hosting/)

## More about CivicTheme

Expand Down
Loading

0 comments on commit 2e3c62e

Please sign in to comment.