Skip to content

Merge pull request #7 from itk-dev/feature/show-on-all-pages #22

Merge pull request #7 from itk-dev/feature/show-on-all-pages

Merge pull request #7 from itk-dev/feature/show-on-all-pages #22

Workflow file for this run

# Do not edit this file! Make a pull request on changing
# github/workflows/drupal-module/php.yaml in
# https://github.com/itk-dev/devops_itkdev-docker if need be.
### ### Drupal module PHP
###
### Checks that PHP code adheres to the [Drupal coding
### standards](https://www.drupal.org/docs/develop/standards).
###
### #### Assumptions
###
### 1. A docker compose service named `phpfpm` can be run and `composer` can be
### run inside the `phpfpm` service.
### 2. [drupal/coder](https://www.drupal.org/project/coder) is a dev requirement
### in `composer.json`:
###
### ``` shell
### docker compose run --rm phpfpm composer require --dev drupal/coder
### ```
###
### Clean up and check code by running
###
### ``` shell
### docker compose run --rm phpfpm vendor/bin/phpcbf
### docker compose run --rm phpfpm vendor/bin/phpcs
### ```
###
### > [!NOTE]
### > The template adds `.phpcs.xml.dist` as [a configuration file for
### > PHP_CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer/wiki/Advanced-Usage#using-a-default-configuration-file)
### > and this makes it possible to override the actual configuration used in a
### > project by adding a more important configuration file, e.g. `.phpcs.xml`.
name: PHP
env:
COMPOSE_USER: root
on:
pull_request:
push:
branches:
- main
- develop
jobs:
coding-standards:
name: PHP - Check Coding Standards
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: |
docker network create frontend
docker compose run --rm phpfpm composer install
docker compose run --rm phpfpm vendor/bin/phpcs