Skip to content

Commit

Permalink
Merge pull request #213 from UN-OCHA/release-versions/v3.5.0
Browse files Browse the repository at this point in the history
release versions/v3.5.0
  • Loading branch information
berliner authored May 15, 2024
2 parents 09053b9 + 2325cc5 commit c98d34c
Show file tree
Hide file tree
Showing 139 changed files with 4,070 additions and 1,780 deletions.
20 changes: 18 additions & 2 deletions .docksal/commands/phpunit
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
# $DOCROOT - name of the docroot folder
# $DOCKER_RUNNING - (string) "true" or "false"

args="$@"
path="/var/www"
phpunit_xml_path="$PROJECT_ROOT/phpunit.xml"

Expand All @@ -27,4 +26,21 @@ if [[ ! -f "$phpunit_path" ]]; then
exit 1
fi

fin exec "php $path/${phpunit_path} -c $path ${args} $path/$DOCROOT/modules/custom"

COVERAGE=false
args=""
while [ "$1" != "" ]; do
case $1 in
--open-coverage ) COVERAGE=true
;;
*) args="$args $1"
;;
esac
shift
done

fin exec "XDEBUG_MODE=coverage $path/${phpunit_path} -c $path ${args} $path/$DOCROOT/modules/custom --coverage-html $path/$DOCROOT/sites/simpletest/test-coverage"

if $COVERAGE; then
fin utils/open-link "http://ghi-site.docksal.site/sites/simpletest/test-coverage/dashboard.html"
fi
3 changes: 3 additions & 0 deletions .docksal/commands/post-deploy
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ if $IMPORT_BACKUP; then
fi
fi

# Make sure that the code base is up to date.
composer install

echo "Set maintenance mode to on"
drush sset system.maintenance_mode 1 -y

Expand Down
2 changes: 2 additions & 0 deletions .docksal/docksal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ services:
- HID_CLIENT_SECRET
- GRAPHQL_KEY
- COMPOSER_MEMORY_LIMIT=-1
- XDEBUG_ENABLED=1
- XDEBUG_MODE=off

browser:
hostname: browser
Expand Down
4 changes: 2 additions & 2 deletions .github/tests/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ services:
- default

mysql:
image: public.ecr.aws/unocha/mysql:10.6
image: public.ecr.aws/unocha/mysql:10.11
hostname: hpc-content-test-mysql
container_name: hpc-content-test-mysql
environment:
Expand Down Expand Up @@ -92,4 +92,4 @@ services:
ports:
- "7900:7900"
networks:
- default
- default
5 changes: 3 additions & 2 deletions .github/workflows/composer-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ jobs:
id: update-action
uses: UN-OCHA/actions/composer-update@main
with:
aws_access_key_id: ${{ secrets.ECR_AWS_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.ECR_AWS_SECRET_ACCESS_KEY }}
github_access_token: ${{ secrets.PAT }}
patch_branch: 'develop'
patch_packages: 'drupal/*'
patch_branch: ${{ github.head_ref || github.ref_name }}
patch_maintainers: ${{ vars.DRUPAL_MAINTAINERS }}
slack_bot_token: ${{ secrets.SLACK_BOT_TOKEN }}
slack_channel_name: ${{ vars.SLACK_CHANNEL }}
21 changes: 14 additions & 7 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,17 @@ on: [pull_request]
jobs:
tests:
runs-on: ubuntu-latest
permissions:
contents: write
checks: write
pull-requests: write
actions: read
statuses: write

steps:
- name: Checkout Code
id: checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Extract PHP Version
id: php
Expand Down Expand Up @@ -97,6 +103,7 @@ jobs:
with:
run: |
docker-compose -f .github/tests/docker-compose.yml exec -w /srv/www -T drupal /usr/bin/composer run sub-theme
- name: PHPCS
id: phpcs
uses: cafuego/command-output@main
Expand Down Expand Up @@ -157,18 +164,18 @@ jobs:
docker-compose -f .github/tests/docker-compose.yml exec -T drupal drush watchdog:show
- name: Find Comment
uses: peter-evans/find-comment@v2
uses: peter-evans/find-comment@v3
id: fc
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: ${{ github.event.pull_request.number }}
comment-author: 'github-actions[bot]'
body-includes: Build output

- name: Create or update comment
uses: peter-evans/create-or-update-comment@v2
uses: peter-evans/create-or-update-comment@v4
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}
comment-id: ${{ steps.fc.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number }}
body: |
Expand All @@ -193,7 +200,7 @@ jobs:
- name: Slack Success Notification
id: slack_success
if: success()
uses: slackapi/slack-github-action@v1.23.0
uses: slackapi/slack-github-action@v1.25.0
with:
channel-id: '${{ vars.SLACK_CHANNEL }}'
payload: |
Expand All @@ -220,7 +227,7 @@ jobs:
- name: Slack Failure Notification
id: slack_failure
if: failure()
uses: slackapi/slack-github-action@v1.23.0
uses: slackapi/slack-github-action@v1.25.0
with:
channel-id: '${{ vars.SLACK_CHANNEL }}'
payload: |
Expand Down
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,14 @@
"drupal/core-recommended": "^10",
"drupal/csp": "^1.16",
"drupal/ctools": "^4.0",
"drupal/custom_field": "^2.0@RC",
"drupal/custom_field": "^3",
"drupal/diff": "^1.1",
"drupal/double_field": "^4.0",
"drupal/editor_advanced_link": "^2.0",
"drupal/entity_browser": "^2.9",
"drupal/entity_browser_table": "^1.4",
"drupal/entity_usage": "^2.0@beta",
"drupal/field_config_cardinality": "^3.0",
"drupal/field_group": "^3.4",
"drupal/gin": "^3.0@RC",
"drupal/google_tag": "^1.4",
Expand Down
Loading

0 comments on commit c98d34c

Please sign in to comment.