This repository contains a GitHub Action for building and testing Zikula modules.
For more information about Zikula visit it's project repository.
This action downloads and installs a specific Zikula core version in order to check and test a module.
- Name of vendor. Example:
Acme
. - Name of module without vendor and
Module
suffix. Example:News
. - Version of module using SemVer notation. Example:
1.0.0
. - The Zikula version which should be used. Must be one of the following options:
ZK30
- Targets the last stable Zikula 3.0.x version.ZK3DEV
- Targets the last unstable Zikula 3.x version (Git branch).ZK20
- Targets the last stable Zikula 2.0.x version.ZK2DEV
- Targets the last unstable Zikula 2.x version (Git branch).ZK15
- Targets the last stable Zikula 1.5.x version.ZK15DEV
- Targets the last unstable Zikula 1.5.x version (Git branch).
- Path to the directory containing the
extensions/
folder (including trailing slash). Default""
. - Whether to create module archives as build artifacts (set to
true
). Defaultfalse
. - Host of database. Default
mysql
.- Note that during a workflow's execution all containers (job, service, actions) get attached to the same user defined bridge network on the host, meaning all the containers can reach each other over that network, not via the host's localhost networking. Thus, this action connects to your database using the name of the corresponding service as hostname.
- Port of database. Default
3306
.- Note this is the default port (read explanation for
database_host
above).
- Note this is the default port (read explanation for
- User of database. Default
zikula
. - Password of database. Default
zikula
. - Name of database. Default
zikula
. - Comma-separated list of desired analysis tools or
all
for all tools.- Can be used to improve performance by skipping unwanted tools.
- Ensure that it also contains a comma at the start and the end.
- Default value:
",php-parallel-lint,lint:container,lint:yaml,lint:twig,translations,doctrine-info,php-cs-fixer,phpunit-bridge,security-checker,phploc,phpmetrics,php-coupling-detector,"
.
- Checks (lint): php-parallel-lint, lint:container, lint:yaml, lint:twig
- Translations: translations executes the
translation:extract
command - Checks (coding style): php-cs-fixer
- Tests: phpunit-bridge (requires a file named
phpunit.xml.dist
in the module's root folder). - Security: security-checker
- Info: phploc, dephpend, phpmetrics, php-coupling-detector
- Checks (other): phpmnd, phpa
- Checks (potentially running a bit longer): phpcpd, phpmd, phan, phpstan, psalm
If create_artifacts
is set to true
then as a result you will have a directory named AcmeNewsModule_v1.0.0
including vendor dependencies which can be used for a release.
uses: docker://guite/zikula-action:latest
with:
args: Zikula MultiHook 1.0.0 ZK3DEV src/ true
A sample project using this GitHub Action can be found here.
The Docker image for this action is built automatically and located here: https://hub.docker.com/r/guite/zikula-action.
You can run it in any given directory like this:
docker run --rm -it -w=/app -v ${PWD}:/app guite/zikula-action:latest Zikula MultiHook 1.0.0 ZK3DEV src/ true