Skip to content

Commit

Permalink
Merge pull request #283 from City-of-Helsinki/dev
Browse files Browse the repository at this point in the history
Dev to main
  • Loading branch information
teroelonen authored Oct 11, 2023
2 parents 18bc57d + 793ec22 commit 5309da6
Show file tree
Hide file tree
Showing 21 changed files with 5,283 additions and 250 deletions.
12 changes: 4 additions & 8 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,14 @@ DRUPAL_HOSTNAME=helfi-elo.docker.so
OC_PROJECT_NAME=hki-kanslia-tyo-yrittaminen-test

# Stage file proxy origin domain
STAGE_FILE_PROXY_ORIGIN=https://tyoyrittaminen.blob.core.windows.net

STAGE_FILE_PROXY_ORIGIN=
# Stage file proxy path
STAGE_FILE_PROXY_ORIGIN_DIR=

# Docker image
DRUPAL_IMAGE=ghcr.io/city-of-helsinki/drupal-web:8.1
COMPOSE_PROFILES=queue

# Default source @alias where to sync database and files from
DRUPAL_SYNC_SOURCE=main
# Docker image
DRUPAL_IMAGE=ghcr.io/city-of-helsinki/drupal-web:8.2

# Public webroot
DRUPAL_WEBROOT=public

DRUPAL_SYNC_FILES=no
13 changes: 6 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@ on:
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.2-alpine
options: --hostname app

services:
db:
Expand All @@ -31,7 +33,7 @@ jobs:
run: composer install --no-interaction

- name: Scan security updates
run: drush pm:security
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
Expand All @@ -53,16 +55,13 @@ jobs:
- name: Start services
run: |
drush runserver $SIMPLETEST_BASE_URL > /dev/null 2>&1 &
chromedriver --port=4444 > /dev/null 2>&1 &
# Chromium browser is required to run 'functional-javascript' and
# 'existing-site-javascript' tests.
chromium-browser --headless --disable-gpu --no-sandbox --remote-debugging-port=9222 &
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
[ -d "tests/" ] && composer test-php tests/ || echo "No DTT tests found. Ignoring..."
if [ -d "tests/" ]; then composer test-php tests/; else echo "No DTT tests found. Ignoring..."; fi
6 changes: 5 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
"drupal/coder": "^8.3",
"drupal/core-dev": "^9.1",
"phpspec/prophecy-phpunit": "^2",
"phpunit/phpunit": "^9.6"
"phpunit/phpunit": "^9.6",
"weitzman/drupal-test-traits": "^2.1"
},
"conflict": {
"drupal/drupal": "*"
Expand All @@ -44,6 +45,9 @@
"cweagans/composer-patches": true,
"drupal/core-composer-scaffold": true,
"php-http/discovery": false
},
"audit": {
"abandoned": "report"
}
},
"extra": {
Expand Down
Loading

0 comments on commit 5309da6

Please sign in to comment.