Skip to content

Commit

Permalink
Dev to main (#1599)
Browse files Browse the repository at this point in the history
* UHF-10354: new cron entrypoint (#1506)

* UHF-10354: Remove base.sh

* UHF-10354: Remove migrate-hearings.sh

* UHF-10343: Updating the liikunta_suunnistuskartta_avustus forms texts (#1513)

* UHF-10343: Update liikunta_suunnistuskartta_avustus forms texts to new version

* UHF-10343: Fix issue with application search where the search button and the clear the search button have no spacing in between

* UHF-10343: Fix issue with unneccessary wrapper around the application search form styles

* UHF-10248: Run tests against automatic updates (#1516)

* UHF-10131: sentry (#1515)

* UHF-10131: Repurpose grants_logger module for sentry logging

* UHF-10131: Fix typo

* UHF-10131: Code deduplication

* UHF-10131: Capture exceptions

* UHF-10131: Remove comment

* feat: UHF-XXXX: Fix failing tests by fixing dependency-related errors. (#1517)

* Refactor events to custom module to get installation to succeed
* Make some services use lazyloading with events service.
* Add update hook & make sure drush deploy is run 1st.
* PHPCS
* Try to clear caches after importing DB to no avail.

* fix: Disable pubsub (#1518)

* must be completely commented out (#1519)

* UHF-10276: Replace old dialog.js implementation from forms (#1511)

* UHF-10276: Replace the dialog.js functionality with custom dialog

* UHF-10276: Fix translations, style the close button on the dialog

* UHF-10276: Add focus trap for the dialog

* UHF-10276: Refactor dialog and survey styles together

* UHF-10276: Add comment about survey similarities

* UHF-10276: Refactor dialog to a separate file so it can be used by other grants modules, refactored dialog.js away from grants_profile, add translations and remove old dialog.js

---------

Co-authored-by: Janne Suominen <janne.suominen@siili.com>

* Removed article permissions (#1522)

* Automatic update (#1520)

* Update configuration

* Revert unwanted changes from configuration

* Revert unwanted changes from configuration

* Update .gitignore

* Removed article permissions

---------

Co-authored-by: Tero Elonen <tero.elonen@druid.fi>
Co-authored-by: Janne Suominen <janne.suominen@siili.com>
Co-authored-by: tuutti <tuutti@iki.fi>

* UHF-10276: Fix translations on webform.form.unsaved.js (#1525)

* UHF-10276: Replace the dialog.js functionality with custom dialog

* UHF-10276: Fix translations, style the close button on the dialog

* UHF-10276: Add focus trap for the dialog

* UHF-10276: Refactor dialog and survey styles together

* UHF-10276: Add comment about survey similarities

* UHF-10276: Refactor dialog to a separate file so it can be used by other grants modules, refactored dialog.js away from grants_profile, add translations and remove old dialog.js

* UHF-10276: Manually trigger translations for the webform.form.unsaved javascript file

* UHF-9938: Update pipeline triggers (#1529)

* Update pipeline triggers

* UHF-9938: Update README.md

* Update configuration (#1523) (#1530)

Co-authored-by: hel-platta-automation <95360595+hel-platta-automation@users.noreply.github.com>

* fix: UHF-10656: Add missing translations. Fix incorrect config name for help texts. (#1521)

* UHF-10656: Add translations for issuer_name

* UHF-10656: Fix translations, #text -> #markup

* fix: Remove form tool from composer (#1526)

* Remove form tool from composer
* Update configuration (#1523)

---------

Co-authored-by: hel-platta-automation <95360595+hel-platta-automation@users.noreply.github.com>

* conf: Update configuration (#1532)

* Update configuration (#1534)

* fix: Add suffix for filenames to force unique files. (#1536)

* Update configuration (#1537)

Co-authored-by: khalima <1712902+khalima@users.noreply.github.com>

* Update configuration (#1538)

* UHF-10826 Update ATV-profile after mandate has been requested (#1531)

* UHF-10826: get rid of the unnecessary nesting

* UHF-10826: clean the old style properties

* UHF-10826: both traits are in base class

* UHF-10826: get company data after mandating user and send it to ATV

* UHF-10826: missing comment

* UHF-10826: Add single document query to HTTP

* UHF-10826: Small changes + handle new profile.

---------

Co-authored-by: Janne Suominen <janne.suominen@siili.com>

* Update configuration (#1541)

* UHF-10741: Force user to visit all pages before submitting application (#1533)

* UHF-10741: Force user to visit all pages before submitting application

* UHF-10741: Fix phpcs

* UHF-10741: Fix translations

* fix: UHF-10845: Update applications from profile data (#1540)

* UHF-10845: cleanup
* UHF-10845: comments
* UHF-10845: update the company information after saing
* UHF-10845: correct comment style
* UHF-10845: code fixes
* UHF-10845: added missing parameter types
* UHF-10845: prevent phpstan error by making the class final
* UHF-10845: missing entitytypemanager
* UHF-10845: code fixes
* UHF-10845: fixed docblok
* UHF-10845: Refetch profile after saving it to make sure we use latest data.
* UHF-10845: clarify that this change is on purpose

---------

Co-authored-by: Janne Suominen <janne.suominen@siili.com>

* fix: UHF-10817: Make loading of submissions better. Fix ID63 form same time. Also title loading for new applications. (#1539)

* UHF-10537: Update document dl function
* UHF-10537: Set processed file types to static
* UHF-10537: Load application types via webform.
* UHF-10537: Add new example applications.
* UHF-10537: New configs
* UHF-10537: PHPCS
* UHF-10537: Add check for nonexistent UUID
* Comment out parent_loadData in storage controller
* Comment out parent_loadData in storage controller
* UHF-10877: Add rest queries for testing race condition things. Suggestion for fixing race conditions.
* UHF-10537: Refactor to support webform title usage.
* UHF-10817: PHPCS
* UHF-10817: Refactor ApplicationController.
* UHF-10817: Remove base Exception throwing.
* UHF-10817: A bit more refactoring to remove static methods & calls.
* UHF-10817: Fix copy form button in admin UI.

* feat: Snyk upgrade b785815b434b86e46b4901cb202437dd (#1548)

* Update configuration (#1523)

* fix: upgrade @playwright/test from 1.41.2 to 1.48.0

Snyk has created this PR to upgrade @playwright/test from 1.41.2 to 1.48.0.

See this package in npm:
@playwright/test

See this project in Snyk:
https://app.snyk.io/org/city-of-helsinki/project/aed93529-486e-499e-9b12-5815057dc0ec?utm_source=github&utm_medium=referral&page=upgrade-pr

* Update e2e docker image

---------

Co-authored-by: hel-platta-automation <95360595+hel-platta-automation@users.noreply.github.com>
Co-authored-by: snyk-bot <snyk-bot@snyk.io>

* feat: [Snyk] Upgrade @types/node from 20.11.7 to 20.16.11 (#1545)

* Update configuration (#1523)

* fix: upgrade @types/node from 20.11.7 to 20.16.11

Snyk has created this PR to upgrade @types/node from 20.11.7 to 20.16.11.

See this package in npm:
@types/node

See this project in Snyk:
https://app.snyk.io/org/city-of-helsinki/project/aed93529-486e-499e-9b12-5815057dc0ec?utm_source=github&utm_medium=referral&page=upgrade-pr

---------

Co-authored-by: hel-platta-automation <95360595+hel-platta-automation@users.noreply.github.com>
Co-authored-by: snyk-bot <snyk-bot@snyk.io>

* feat: [Snyk] Upgrade dotenv from 16.4.1 to 16.4.5 (#1546)

* Update configuration (#1523)

* fix: upgrade dotenv from 16.4.1 to 16.4.5

Snyk has created this PR to upgrade dotenv from 16.4.1 to 16.4.5.

See this package in npm:
dotenv

See this project in Snyk:
https://app.snyk.io/org/city-of-helsinki/project/aed93529-486e-499e-9b12-5815057dc0ec?utm_source=github&utm_medium=referral&page=upgrade-pr

---------

Co-authored-by: hel-platta-automation <95360595+hel-platta-automation@users.noreply.github.com>
Co-authored-by: snyk-bot <snyk-bot@snyk.io>

* feat: [Snyk] Upgrade @faker-js/faker from 8.3.1 to 8.4.1 (#1547)

* Update configuration (#1523)

* fix: upgrade @faker-js/faker from 8.3.1 to 8.4.1

Snyk has created this PR to upgrade @faker-js/faker from 8.3.1 to 8.4.1.

See this package in npm:
@faker-js/faker

See this project in Snyk:
https://app.snyk.io/org/city-of-helsinki/project/aed93529-486e-499e-9b12-5815057dc0ec?utm_source=github&utm_medium=referral&page=upgrade-pr

* Update e2e tests

---------

Co-authored-by: hel-platta-automation <95360595+hel-platta-automation@users.noreply.github.com>
Co-authored-by: snyk-bot <snyk-bot@snyk.io>

* Update configuration (#1542)

* Automatic update (#1549)

* Update configuration

* Reverted filter changes.

---------

Co-authored-by: Markus Kalijärvi <markus.kalijarvi@druid.fi>

* Update configuration (#1550)

* fix: UHF-10656: Fix incorrectly copied transaltions (#1552)

* Update configuration (#1551)

* Update configuration (#1554)

* doc: UHF-10807: Add example for new form + update schema (#1555)

* UHF-10807: Add example for new form + update schema

* UHF-10807: Fix formatting for schema file.

* docs: UHF-10806: Example for form ID71 & schema updates (#1557)

* UHF-10806: Example & schema updates

* UHF-10806: Format

* Update configuration (#1556)

* feat: UHF-10556: Update dropdown options for Myönnetyt / Haetut component. (#1558)

* UHF-10556: Add function to override issuer options.

* UHF-10556: Remove STEA from dropdown options.

* UHF-10556: Add tests for new field options + other things.

* UHF-10556: Rollback yleisavustus?

* fix: UHF-10711: New form changes (#1560)

* UHF-10711: remove duplicate title

* UHF-10711: date format from c which is datetime, to Y-m-d

* UHF-10711: added missing 3.5 fields

* UHF-10711: added the mappings

* UHF-10711: langcode fi because we have to

* UHF-10711: sv translation

* UHF-10711: finnish translation

* UHF-10711: rename the form

* UHF-10711: small changes

* UHF-10711: update the configuration with translation

* UHF-10711: remove brs

* UHF-10711: added summa fields

* UHF-10711: remove wrong configuration, added texts / requirements in correct form

* UHF-10711: added tulo and meno sv translation

* UHF-10711: more sv translations

* UHF-10711: more translations including english

* UHF-10711: useless comment

* UHF-10711: tweak translations

* UHF-10711: Fix data type on other hidden field & remove required status from one

* UHF-10711: Add new booleanish to Kyllä/Ei converter and use it for fields.

* UHF-10711: Typo

* UHF-10711: PHPCS

* UHF-10711: Add ensisijainen taiteenala field.

---------

Co-authored-by: Janne Suominen <janne.suominen@siili.com>

* Update configuration (#1562)

* feat: UHF-8678: Use Drupal.cookieConsent functions (#1559)

* UHF-8678: Updated the matomo.js to use Drupal.cookieConsent functions.

* UHF-8678: Added dist.

* fix: UHF-10903: Update application copy modal to use new dialog (#1563)

* UHF-10903: New dialog form

* UHF-10903: Refactor application copy to custom controller.

* UHF-10903: Add custom selector option for dialogs.

* UHF-10903: Update tests for new copy functionality.

* UHF-10903: Rename method + 1 error

* UHF-10903: Fix typo

* UHF-10903: Refactor createDialog to support object argument.

* Uhf x more tranlations (#1569)

* missing tooltip

* more tooltips

* Update configuration (#1565)

* feat: UHF-10728: KUVA ID70 form e2e tests (#1566)

* UHF-10728: Added SLOWMO environment variable to wait 1 second before clicking elements. Works like this: SLOWMO=true npx playwright...

* UHF-10728: Added 'exit on first error' and 'slowmo' instructions.

* UHF-10728: Added the application data for the iakkaiden-kulttuuri-ja-liikunta form.

* UHF-10728: Added the registered_community test for the "iakkaiden-kulttuuri-ja-liikunta" webform.

* UHF-10728: Minor changes to test + one warning removal.

* UHF-10728: PHPCS

---------

Co-authored-by: Janne Suominen <janne.suominen@siili.com>

* Update configuration (#1571)

* Uhf x more tranlations (#1572)

* missing tooltip

* more tooltips

* more translations

* duplicated for some reason

* fix: Remove some remaining STEAs.. (#1573)

* fix: Remove config (#1577)

* Update configuration (#1574)

* UHF-10629: Added rent income composite to webform print controller (#1578)

* fix: UHF-10711: Form & translation fixes (#1580)

* UHF-10711: Form & translation fixes

* UHF-10711: Form title + description

* UHF-10711: Target group fix.

* UHF-10711: Grant type translations.

* UHF-10571: Modify the order where questions are asked in budget_cost_static webform element (#1575)

* feat: UHF-10693: Add copyable list for application delete function + new Event for sending to integration. (#1576)

* Update configuration (#1579)

* UHF-10883 (#1581)

* UHF-10883: Change compensation_explanation

* UHF-10883: Change liikuntatiloista_maksetut_vuokrat_fieldset

* UHF-10883: Change lajijaostot_info

* UHF-10883: Change ClubSectionComposite component

* UHF-10883: Fix club-section styles

* UHF-10883: Change lajijaostot_helsinkilaisille_aktiiviharrastajille

* fix: UHF-10711: Requested changes ID70 form (#1582)

* UHF-10711: Requested changes.

* UHF-10711: Form title + some translations.

* UHF-10711: Form item description styling fixes

* UHF-10711: Last fixes from Janne.

* UHF-10711: REbuilt styles

---------

Co-authored-by: Tero Elonen <tero.elonen@druid.fi>

* UHF-10711: Last(?) fixes.. (#1583)

* Uhf 10711 fixes 3 (#1584)

* UHF-10711: Last(?) fixes..

* UHF-10711: HDBT version

* UHF-10456: Sosiaali-, terveys- ja pelastustoimen yleisavustus (#1567)

* UHF-10456: Add configs

* UHF-10456: Add rest of necessary configs

* UHF-10456: Fix translations

* UHF-10456: Missing title translations

* UHF-10456: Fix mismapping

* UHF-10456: Fix phpcs

* UHF-10952: Allow login with high eIDAS levels of assurance (#1585)

https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eIDAS+Levels+of+Assurance

* fix: UHF-10711: Last fix to form & test update (#1586)

* Update Azure Devops pipelines (#1568)

* build: pipeline templates by Ansible scripts

* Remove obsolete pipeline files

* UHF-10722 (#1587)

* UHF-10722: separate function for rented premise and premise

* UHF-10722: missing help text

* UHF-10722: missing return type

* UHF-10722: phpcs fixes

* UHF-10722: the needed composite class was already made. Revert the change and use the ready made class instead

* UHF-10722: correct comment

* Add missing translations (#1589)

* Set form_submit & form_submit_back values for forms & default values. (#1588)

* UHF-10722: remove the visibility helper text (#1591)

* UHF-10722: remove the visibility helper text

* UHF-10722: remove also the text from part4

* UHF-10722: added comment

* UHF-10456: Compensation purpose fixes (#1592)

* UHF-11044: Update texts (#1593)

* UHF-10903: Fix missing dialog translations. (#1595)

* UHF-11041: Change pipeline triggers (#1594)

* UHF-10711: Fixes per comments (#1598)

* UHF-10345: Uncommentend previously failing tests. (#1596)

* UHF-10455: Add new General grants for welfare and health promotion form (#1597)

* UHF-10149: Add tests for after submit messaging (#1590)

* Add tests for after submit messaging

* Add tests for after submit messaging

* UHF-10149: Add attachment test to messaging

* UHF-10149: Fix variable name

* UHF-10149: Remove one await

---------

Co-authored-by: Janne Suominen <janne.suominen@siili.com>

* Change description class coloring to be grants specific styling (#1600)

* UHF-11076 (#1601)

* UHF-11076: fix encoded ampersands on form fields after loading data from atv

* UHF-11076: fix the encoded ampersand problem on grantpremsesservice. decode also all string string fields as well

* UHF-11076: reorder the first section by weight

* UHF-11076: sort all sections inside a page

* Use trim and rawurlencode to prevent possible infinite loop. (#1602)

* changes for release (#1604)

* UHF-11127: Fix thrown error when user tries to get form with out uuid (#1606)

* UHF-11127: Fix thrown error when user tries to get form with out uuid in metadata.

* UHF-11127: Make sure the form_uuid is always set, even if it's not in the og metadata.

* UHF-10455: Fixes to recently added forms (#1608)

* Fix missing SV translations
* Remove STEA as an option

* was added most likely to fix search_api issue #3195994. Removing the patch since it is fixed (#1610)

Co-authored-by: Risto Nykänen <risto.nykanen@DRUID-M4PHW0KPWN.local>

* Update configuration (#1611)

Co-authored-by: khalima <1712902+khalima@users.noreply.github.com>

* UHF-11076 (#1614)

* UHF-11076.1: prevent encoded characters on filled application preview

* UHF-11076.1: this is not worth an error

* UHF-11137: Run CI pipelines using Docker compose setup (#1613)

* UHF-11137: Run CI pipelines using Docker compose setup

* UHF-11137: Disabled config language check again

* UHF-11137: Bumped php version

* UHF-11137: Fixed phpunit env variables

* UHF-11137: Updated helfi platform tools.

* UHF-11137: Updated platform tools.

---------

Co-authored-by: Markus Kalijärvi <markus.kalijarvi@druid.fi>

* UHF-10935: Added class and margin for delete attachment button (#1615)

* UHF-10935: Added class and margin for delete attachment button

* UHF-10935: Removed nesting

* Automatic update (#1616)

* Update configuration

* Update configuration

* PHPCS + tbachert/spi

---------

Co-authored-by: Janne Suominen <janne.suominen@siili.com>

* Add overwrites (#1617)

* Add overwrites

* Add overwrites 70

* Uhf xx add 68 settings (#1618)

* Add overwrites

* Add overwrites 70

* Fix hyteed

* Uhf xx add 68 settings (#1619)

* Add overwrites

* Add overwrites 70

* Fix hyteed

* Fix sotepeed + import

* Update webform configs in install folder. (#1609)

* Update webform configs in install folder.

* Add READMEs

* UHF-11137: Reusable workflows (#1621)

* UHF-11137: Reusable workflows

* UHF-11137: Fixed check

* UHF-10593: Add 1000 character limit to two fields on two forms (#1622)

* UHF-10593: Add 1000 character limit to forms 47 and 49

* UHF-10593: Add missing translations for the character limit field

* Automatic update (#1620)

* Update configuration

* Updated carbon.

---------

Co-authored-by: Markus Kalijärvi <markus.kalijarvi@druid.fi>

---------

Co-authored-by: Santeri Hurnanen <santeri.hurnanen@fame.fi>
Co-authored-by: Tero Elonen <2276077+teroelonen@users.noreply.github.com>
Co-authored-by: tuutti <tuutti@iki.fi>
Co-authored-by: Janne Suominen <janne.suominen@siili.com>
Co-authored-by: rpnykanen <48206082+rpnykanen@users.noreply.github.com>
Co-authored-by: hel-platta-automation <95360595+hel-platta-automation@users.noreply.github.com>
Co-authored-by: Tero Elonen <tero.elonen@druid.fi>
Co-authored-by: khalima <1712902+khalima@users.noreply.github.com>
Co-authored-by: jeremysteerio <49063836+jeremysteerio@users.noreply.github.com>
Co-authored-by: snyk-bot <snyk-bot@snyk.io>
Co-authored-by: Markus Kalijärvi <markus.kalijarvi@druid.fi>
Co-authored-by: annadruid <161724181+annadruid@users.noreply.github.com>
Co-authored-by: Tero Virtanen <105207219+terovirtanen@users.noreply.github.com>
Co-authored-by: Risto Nykänen <risto.nykanen@DRUID-M4PHW0KPWN.local>
  • Loading branch information
15 people authored Jan 15, 2025
1 parent 8311023 commit 0346827
Show file tree
Hide file tree
Showing 223 changed files with 20,562 additions and 3,685 deletions.
4 changes: 4 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.git/
.github/
.idea/
*.sql
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ COMPOSE_PROJECT_NAME=hel-fi-drupal-grant-applications
DRUPAL_HOSTNAME=hel-fi-drupal-grant-applications.docker.so

# Docker image
DRUPAL_IMAGE=ghcr.io/city-of-helsinki/drupal-web:8.2
DRUPAL_IMAGE=ghcr.io/city-of-helsinki/drupal-web:8.3

# Default source @alias where to sync database and files from
DRUPAL_SYNC_SOURCE=main
Expand Down
18 changes: 18 additions & 0 deletions .github/dependabot.yml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Please see the documentation for all configuration options:
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
version: 2
updates:
- package-ecosystem: "composer" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
allow:
# Update only direct dependencies. This reduces spam since most
# indirect dependencies are handles by update-config workflow.
- dependency-type: "direct"
ignore:
# Updated by update-config workflow
- dependency-name: "drupal/helfi_*"
- dependency-name: "drupal/hdbt*"
# Updated separately
- dependency-name: "drupal/core*"
35 changes: 1 addition & 34 deletions .github/workflows/artifact.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,37 +7,4 @@ on:
name: Build artifacts
jobs:
build:
runs-on: ubuntu-latest
container:
image: ghcr.io/city-of-helsinki/drupal-php-docker:8.3-alpine

services:
db:
image: mysql:8
env:
MYSQL_USER: drupal
MYSQL_PASSWORD: drupal
MYSQL_DATABASE: drupal
MYSQL_ROOT_PASSWORD: drupal
ports:
- 3306:3306

steps:
- uses: actions/checkout@v4

- name: Build project
run: composer install --no-interaction

- name: Setup drupal and save database dump
run: |
drush si -y && drush cr
drush si --existing-config -y
drush cim -y
drush sql-dump --result-file=${GITHUB_WORKSPACE}/latest.sql
- name: Upload latest database dump
uses: actions/upload-artifact@v4
with:
name: latest.sql
path: latest.sql
retention-days: 10
uses: city-of-helsinki/drupal-gh-actions/.github/workflows/build-artifact.yml@main
85 changes: 3 additions & 82 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,87 +3,8 @@ on:
push:
branches: ['main', 'dev']
name: CI
env:
SYMFONY_DEPRECATIONS_HELPER: disabled
SIMPLETEST_BASE_URL: http://app:8888
jobs:
tests:
runs-on: ubuntu-latest
container:
image: ghcr.io/city-of-helsinki/drupal-php-docker:8.3-alpine
options: --hostname app

services:
db:
image: mysql:8
env:
MYSQL_USER: drupal
MYSQL_PASSWORD: drupal
MYSQL_DATABASE: drupal
MYSQL_ROOT_PASSWORD: drupal
ports:
- 3306:3306
steps:
- uses: actions/checkout@v4

- name: Set browsertest output folder
run: |
echo "BROWSERTEST_OUTPUT_DIRECTORY=$GITHUB_WORKSPACE/public/sites/simpletest" >> $GITHUB_ENV
# TODO this does not pass
#- name: Make sure configuration was exported in correct language (en or und)
# run: |
# OUTPUT=$(grep -oP '^langcode: \b(?!(?:en|und)\b)\w+' conf -R || true)

# if [ ! -z "$OUTPUT" ]; then
# echo "Found configuration that does not match the pattern 'langcode: (en|und)':" >> $GITHUB_STEP_SUMMARY
# echo "$OUTPUT" >> $GITHUB_STEP_SUMMARY
# exit 1
# fi

- name: Build project
run: composer install --no-interaction

- name: Scan security updates
run: composer audit

- name: Check that subtheme is not built with dev mode
run: if grep -q 'sourceMappingURL=' -R public/themes/custom/hdbt_subtheme/dist/css; then exit 1; fi

- name: Run PHPCS
run: |
vendor/bin/phpcs public/modules/custom/
vendor/bin/phpcs public/themes/custom/
- name: Run phpstan
run: vendor/bin/phpstan analyze

- name: Download latest dump
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh run download -n latest.sql

- name: Install Drupal
run: |
mysql --user=drupal --password=drupal --database=drupal --host=db --port=3306 -A < latest.sql
drush deploy
- name: Start services
run: |
drush runserver $SIMPLETEST_BASE_URL --dns > /dev/null 2>&1 &
# Wait for drush server to start.
for i in {1..5}; do RESPONSE_CODE=$(curl -s -o /dev/null -w "%{http_code}" "$SIMPLETEST_BASE_URL" || true); if [ "$RESPONSE_CODE" -gt "301" ] || [ "$RESPONSE_CODE" -lt "200" ]; then sleep 2; fi; done
- name: Run PHPUnit tests
run: |
composer test-php public/modules/custom
if [ -d "tests/" ]; then composer test-php tests/; else echo "No DTT tests found. Ignoring..."; fi
- name: Create an artifact from test report
uses: actions/upload-artifact@v4
if: always()
with:
name: results
path: ${{ env.BROWSERTEST_OUTPUT_DIRECTORY }}
retention-days: 1
uses: city-of-helsinki/drupal-gh-actions/.github/workflows/project-tests.yml@main
with:
check_config_language: false
103 changes: 3 additions & 100 deletions .github/workflows/update-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,105 +3,8 @@ on:
repository_dispatch:
types: [config_change]
name: Update config
env:
GH_TOKEN: ${{ github.token }}
jobs:
update-config:
runs-on: ubuntu-latest
container:
image: ghcr.io/city-of-helsinki/drupal-php-docker:8.3-alpine
services:
db:
image: mysql:8
env:
MYSQL_USER: drupal
MYSQL_PASSWORD: drupal
MYSQL_DATABASE: drupal
MYSQL_ROOT_PASSWORD: drupal
ports:
- 3306:3306

steps:
- uses: actions/checkout@v4

- name: Check if required secrets are set
env:
AUTOMATIC_UPDATE_TOKEN: ${{ secrets.AUTOMATIC_UPDATE_TOKEN }}
if: env.AUTOMATIC_UPDATE_TOKEN == ''
run: exit 1

- name: Download latest dump
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh run download -n latest.sql
- name: Prepare setup
run: |
# We install Drupal from existing dump, so locale_install() hook
# is never fired. Make sure the translations folder exists.
mkdir -p public/sites/default/files/translations -p
- name: Build project
run: |
composer install --no-interaction
$(drush sql:connect) < latest.sql
drush cim -y && drush updb -y && drush cr
composer update drupal/helfi_* drupal/hdbt* -W --no-interaction
drush cr
# Update translations from localize.drupal.org and helfi-modules
# before running update hooks to reduce clutter in configuration files.
drush locale:check && drush locale:update
drush updb -y
# Update translations from helfi_platform_config. These translations
# consists of overrides for non customised translations and will
# override current translation with a non customised translation.
drush helfi:locale-import helfi_platform_config
drush cex -y
# Update platform
drush helfi:tools:update-platform
- name: Check module versions
id: module-status
run: |
MODE="delete"
drush helfi:tools:check-composer-versions $GITHUB_WORKSPACE/composer.lock --format=markdown_table >> $GITHUB_STEP_SUMMARY && EXIT_CODE=$? || EXIT_CODE=$?
if [ "$EXIT_CODE" -eq 3 ]; then
MODE="upsert"
echo " " >> $GITHUB_STEP_SUMMARY
echo ":warning: Failed to install the latest version of the packages listed above" >> $GITHUB_STEP_SUMMARY
echo " " >> $GITHUB_STEP_SUMMARY
echo "Please run \`composer why-not drupal/package_name package_version\` to see why." >> $GITHUB_STEP_SUMMARY
fi
echo "MODE=$MODE" >> $GITHUB_OUTPUT
cat $GITHUB_STEP_SUMMARY > /tmp/pr-message.txt
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
commit-message: Update configuration
token: ${{ secrets.AUTOMATIC_UPDATE_TOKEN }}
title: Automatic update
labels: auto-update
body: |
- Updated active configuration.
- Updated platform
branch: update-configuration

- name: Attempt to find PR
env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
id: find-pr
run: echo "number=$(gh pr list --base ${BRANCH_NAME} --head update-configuration --json number --jq '.[].number')" >> $GITHUB_OUTPUT

- name: Comment PR
uses: thollander/actions-comment-pull-request@v2
if: ${{ steps.find-pr.outputs.number != '' }}
with:
comment_tag: status
mode: ${{ steps.module-status.outputs.MODE }}
filePath: /tmp/pr-message.txt
pr_number: ${{ steps.find-pr.outputs.number }}
uses: city-of-helsinki/drupal-gh-actions/.github/workflows/update-config.yml@main
secrets:
automatic_update_token: ${{ secrets.AUTOMATIC_UPDATE_TOKEN }}
2 changes: 1 addition & 1 deletion .platform/schema
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10
14
6 changes: 6 additions & 0 deletions compose.ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
services:
app:
user: "1001:1001"
environment:
SYMFONY_DEPRECATIONS_HELPER: disabled
BROWSERTEST_OUTPUT_DIRECTORY: /app/results
24 changes: 17 additions & 7 deletions compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ services:
depends_on:
- db
environment:
WEBROOT: /app/public
STAGE_FILE_PROXY_ORIGIN: "${STAGE_FILE_PROXY_ORIGIN}"
STAGE_FILE_PROXY_ORIGIN_DIR: "${STAGE_FILE_PROXY_ORIGIN_DIR}"
APP_ENV: "${APP_ENV:-local}"
Expand Down Expand Up @@ -87,6 +88,8 @@ services:
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}-varnish.tls=true"
- "traefik.http.services.${COMPOSE_PROJECT_NAME}-varnish.loadbalancer.server.port=6081"
- "traefik.docker.network=stonehenge-network"
profiles:
- varnish
elastic-proxy:
container_name: "${COMPOSE_PROJECT_NAME}-elastic-proxy"
image: nginxinc/nginx-unprivileged:alpine-perl
Expand Down Expand Up @@ -116,7 +119,7 @@ services:
profiles:
- search
elastic:
image: docker.elastic.co/elasticsearch/elasticsearch:8.4.0
image: docker.elastic.co/elasticsearch/elasticsearch:8.17.0
container_name: "${COMPOSE_PROJECT_NAME}-elastic"
environment:
- node.name="${COMPOSE_PROJECT_NAME}-elastic"
Expand Down Expand Up @@ -151,23 +154,30 @@ services:
- search
artemis:
container_name: "${COMPOSE_PROJECT_NAME}-artemis"
image: quay.io/artemiscloud/activemq-artemis-broker
environment:
AMQ_EXTRA_ARGS: "--user admin --password admin"
image: apache/activemq-artemis
depends_on:
- app
networks:
- internal
- stonehenge-network
profiles:
- queue
chromium:
# @todo Update this to newer version once minkphp supports Selenium 4.
# @see https://github.com/minkphp/MinkSelenium2Driver/pull/372
image: seleniarm/standalone-chromium:106.0
image: selenium/standalone-chromium
environment:
SE_NODE_OVERRIDE_MAX_SESSIONS: "true"
SE_NODE_MAX_SESSIONS: "16"
SE_START_XVFB: "false"
SE_START_VNC: "false"
SE_SESSION_RETRY_INTERVAL: "1"
SE_SESSION_REQUEST_TIMEOUT: "10"
depends_on:
- app
networks:
- internal
profiles:
- testing

networks:
internal:
external: false
Expand Down
19 changes: 6 additions & 13 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,16 +76,11 @@
},
"require-dev": {
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.0",
"dg/bypass-finals": "^1.5",
"donatj/mock-webserver": "^2.4",
"drupal/coder": "^8.3",
"drupal/core-dev": "^10.2.4",
"drupal/core-dev": "^10",
"jangregor/phpstan-prophecy": "^1.0",
"mglaman/phpstan-drupal": "^1.2",
"phpspec/prophecy-phpunit": "^2",
"phpstan/extension-installer": "^1.3",
"phpstan/phpstan": "^1.10",
"phpstan/phpstan-deprecation-rules": "^1.1",
"phpunit/phpunit": "^9.5",
"weitzman/drupal-test-traits": "^2.0"
},
"conflict": {
Expand All @@ -95,13 +90,14 @@
"optimize-autoloader": true,
"sort-packages": true,
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true,
"composer/installers": true,
"cweagans/composer-patches": true,
"dealerdirect/phpcodesniffer-composer-installer": true,
"drupal/core-composer-scaffold": true,
"phpstan/extension-installer": true,
"oomphinc/composer-installers-extender": true,
"php-http/discovery": true
"php-http/discovery": true,
"phpstan/extension-installer": true,
"tbachert/spi": false
},
"audit": {
"abandoned": "report",
Expand All @@ -122,9 +118,6 @@
"drupal/autologout": {
"Modal related issues": "https://www.drupal.org/files/issues/2023-04-25/autologout.2023-04-25.patch"
},
"drupal/search_api": {
"Primary key fix": "patches/search_api_primary_key.patch"
},
"drupal/crop": {
"Fix encoded paths for files": "patches/AU-2225-fix-encoded-paths.patch"
}
Expand Down
Loading

0 comments on commit 0346827

Please sign in to comment.