Issues will move to Gitlab
composer require cweagans/composer-patches
"extra": {
"enable-patching": true,
"composer-exit-on-patch-failure": true,
"patchLevel": {
"drupal/core": "-p2"
},
"patches": {
"drupal/core": {
"ISSUE-NR: DESCRIPTION": "PATCH-URL-OR-FILENAME",
}
}
// OR
"patches-file": "composer.patches.json",
}
curl -o patches/PROJECT-ISSUENR-description.patch \
https://../merge_requests/5636.diff
composer reinstall drupal/PROJECT --prefer-source
cd web/modules/contrib/PROJECT
git remote add ...
git fetch ...
git checkout ...
...
git commit && push
# Open Merge request (verify target branch), update issue
Projects with more than a few tests: Use run-tests.sh with concurrency feature
variables:
_PHPUNIT_CONCURRENT: '1'
Use only what makes sense for your project
variables:
OPT_IN_TEST_PREVIOUS_MAJOR: 1
OPT_IN_TEST_PREVIOUS_MINOR: 1
OPT_IN_TEST_NEXT_MINOR: 1
OPT_IN_TEST_NEXT_MAJOR: 1
OPT_IN_TEST_MAX_PHP: 1
Alternative #1: Scheduled Pipelines
Alternative #2: Combine with manual execution
phpunit (next major):
when: manual
Check your e-mail in the Gitlab notification preferences and adjust notification settings
Redis needs a redis server
phpunit:
services:
- !reference [ .with-database ]
- !reference [ .with-chrome ]
- name: redis:6
Everything in composer.json is merged into project composer.json
"name": "drupal/simplesamlphp_auth",
"config": {
"allow-plugins": {
"simplesamlphp/composer-module-installer": true
}
}
.composer-base:
before_script:
- composer require --dev predis/predis --no-update
Imagemagick needs extra packages
before_script:
- sudo apt-get update
- sudo apt-get install -y --no-install-recommends imagemagick
Redis needs the redis php extension
.phpunit-base:
before_script:
- apt-get update
- apt-get install -y --no-install-recommends $PHPIZE_DEPS
- pecl install redis && docker-php-ext-enable redis
Installing many packages and other system changes can be slow. A separate image is faster, but needs to be maintained
default:
image:
name: berdir/php-8.3-apache-extra:production
FROM drupalci/php-8.3-apache:production
RUN apt-get update && apt-get install -y ...
RUN pecl install redis && docker-php-ext-enable redis
DropzoneJS needs the Dropzone JS library
variables:
DROPZONE_VERSION: v5.9.3
.composer-base:
after_script:
- mkdir $_WEB_ROOT/libraries
- cd $_WEB_ROOT/libraries
- curl -L -o dropzone.zip --silent
https://github.com/dropzone/dropzone/releases/download/$DROPZONE_VERSION/dist.zip
- unzip dropzone.zip
- mv dist dropzone
DropzoneJS also wants to run tests with Dropzone v6
composer (dropzone 6):
extends: .composer-base
variables:
DROPZONE_VERSION: v6.0.0-beta.2
phpunit (dropzone 6):
extends: phpunit
needs:
- "composer (dropzone 6)"
Redis tests run with redis and relay extension and phpredis
phpunit:
parallel:
matrix:
- REDIS_INTERFACE:
- PhpRedis
- Predis
- Relay
Issue #NUMBER by CONTRIBUTORS: DESCRIPTION