Repository for centralising GitHub Actions reusable workflows for OpenEuropa components.
Reusable workflow for Drupal modules. Includes Docker image caching, Drupal core matrix testing, and support for PHPUnit and Behat tests.
| Input | Type | Default | Description |
|---|---|---|---|
php_versions |
string | '["8.3"]' |
JSON array of PHP versions to test |
core_versions |
string | '["~10.4.0", "~10.5.0", "~11.1.0", "~11.2.0"]' |
JSON array of Drupal core versions to test |
run_phpunit |
boolean | true |
Whether to run PHPUnit tests |
run_behat |
boolean | false |
Whether to run Behat tests |
Basic usage with all defaults:
name: ci
on:
pull_request:
push:
branches: [master]
jobs:
ci:
uses: openeuropa/github-ci/.github/workflows/drupal-ci.yml@mainWith Behat tests enabled:
name: ci
on:
pull_request:
push:
branches: [master]
jobs:
ci:
uses: openeuropa/github-ci/.github/workflows/drupal-ci.yml@main
with:
run_behat: trueWith custom PHP and core versions:
name: ci
on:
pull_request:
push:
branches: [master]
jobs:
ci:
uses: openeuropa/github-ci/.github/workflows/drupal-ci.yml@main
with:
php_versions: '["8.3", "8.4"]'
core_versions: '["~10.5.0", "~11.2.0"]'
run_behat: trueReusable workflow for standalone PHP libraries (non-Drupal). Includes Docker image caching and support for PHPUnit and Behat tests.
| Input | Type | Default | Description |
|---|---|---|---|
php_versions |
string | '["8.3"]' |
JSON array of PHP versions to test |
run_phpunit |
boolean | true |
Whether to run PHPUnit tests |
run_behat |
boolean | false |
Whether to run Behat tests |
Basic usage with all defaults:
name: ci
on:
pull_request:
push:
branches: [main]
jobs:
ci:
uses: openeuropa/github-ci/.github/workflows/php-library-ci.yml@mainWith Behat tests (e.g., for behat-transformation-context):
name: ci
on:
pull_request:
push:
branches: [master]
jobs:
ci:
uses: openeuropa/github-ci/.github/workflows/php-library-ci.yml@main
with:
run_phpunit: false
run_behat: trueFor components to use these workflows, their docker-compose.yml must use the standard image:
services:
web:
image: fpfis/httpd-php:8.3-dev
# ...The workflows will automatically modify this to use the -ci variant with the appropriate PHP version during CI runs.