diff --git a/CHANGELOG.md b/CHANGELOG.md index 20e47fc2..969c4979 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,12 @@ Changelog", this file is a reverse-chronological list of merged pull requests. ## Open PR's +- [PR-148](https://github.com/itk-dev/devops_itkdev-docker/pull/148) - 2026-08-21 - + Consolidated the workflow templates into `/lint.yaml` (changelog, + Markdown, YAML, styles, JavaScript) and `/php.yaml` (Composer, coding + standards, Twig), so a commit pays for two runner jobs instead of up to + eleven. All `docker compose run` calls use `--no-deps` and the `vendor` + directory is cached - [PR-145](https://github.com/itk-dev/devops_itkdev-docker/pull/145) - 2026-07-08 - Updated GitHub Actions to latest versions (`actions/checkout` to `v7`, `go-task/setup-task` to `v2`) in workflow templates and repository CI diff --git a/docs/github-actions-templates.md b/docs/github-actions-templates.md index c462c63a..b970f1b4 100644 --- a/docs/github-actions-templates.md +++ b/docs/github-actions-templates.md @@ -1,6 +1,6 @@ @@ -14,13 +14,17 @@ to match the new templates. ## Naming conventions * A workflow file is named after what it is _concerned_ with, not _how_ it's concerned with it and which tools are - actually used, i.e. we have a [`markdown.yaml`](github/workflows/markdown.yaml) file and not a `markdownlint.yaml` - file. -* Some workflows are specific to a project type, currently `drupal` or `symfony`, and these sit in a project type - subfolder, e.g. `github/workflows/drupal`. + actually used, i.e. we have a [`lint.yaml`](github/workflows/symfony/lint.yaml) file and not a `prettier.yaml` file. +* A workflow covers several concerns that share a container and a checkout, so startup costs are paid once: + `lint.yaml` runs the checks needing no project dependencies, `php.yaml` those needing the Composer dependencies. +* Workflows sit in a project type subfolder, currently `drupal`, `drupal-module` or `symfony`, e.g. + `github/workflows/drupal`. * Some tools require configuration files, and these sit in the `config` folder. Some tool configuration may be specific to a project type (or make sence only for a specific project type), and these specific config files sit in a project type subfolder, e.g. `config/drupal/php/.phpcs.xml.dist` and `config/drupal/twig/.twig-cs-fixer.dist.php` +* A workflow covering several concerns needs the configuration of each of them. `config-topics-for` in + [`task/scripts/github-actions-link`](task/scripts/github-actions-link) maps a workflow name to its configuration + folders, e.g. `php.yaml` to both `php` and `twig`. ## Templates @@ -28,49 +32,50 @@ The current list of templates is shown in the following sections. --- -[github/workflows/changelog.yaml](github/workflows/changelog.yaml) +[github/workflows/drupal-module/lint.yaml](github/workflows/drupal-module/lint.yaml) -### Changelog +### Drupal module Lint -Checks that changelog has been updated +Checks the changelog and lints Markdown, YAML, styles and JavaScript. ---- +One job for all of it: a job costs a checkout, an image pull and a minimum +of one billed minute, and none of these checks need the project's +dependencies. Each check runs even if an earlier one fails, so a pull +request reports every problem at once. -[github/workflows/composer.yaml](github/workflows/composer.yaml) +#### Assumptions -### Composer +1. A docker compose service named `markdownlint` for running `markdownlint` + (from + [markdownlint-cli](https://github.com/igorshubovych/markdownlint-cli)) + exists. +2. A docker compose service named `prettier` for running + [Prettier](https://prettier.io/) exists. -Validates composer.json and checks that it's normalized. +#### Changelog -#### Assumptions +Checks that changelog has been updated. -1. A docker compose service named `phpfpm` can be run and `composer` can be - run inside the `phpfpm` service. -2. [ergebnis/composer-normalize](https://github.com/ergebnis/composer-normalize) - is a dev requirement in `composer.json`: +#### Markdown - ``` shell - docker compose run --rm phpfpm composer require --dev ergebnis/composer-normalize - ``` +Lints Markdown files (`**/*.md`) in the project. - Normalize `composer.json` by running +[markdownlint-cli configuration +files](https://github.com/igorshubovych/markdownlint-cli?tab=readme-ov-file#configuration), +`.markdownlint.jsonc` and `.markdownlintignore`, control what is actually +linted and how. - ``` shell - docker compose run --rm phpfpm composer normalize - ``` +#### YAML ---- +Validates YAML files. -[github/workflows/drupal-module/javascript.yaml](github/workflows/drupal-module/javascript.yaml) +#### Styles (CSS and SCSS) -### Drupal module JavaScript (and TypeScript) +Validates styles files (`css/**/*.css`). -Validates JavaScript files. +#### JavaScript (and TypeScript) -#### Assumptions - -1. A docker compose service named `prettier` for running - [Prettier](https://prettier.io/) exists. +Validates JavaScript files (`js/**/*.js`). --- @@ -78,26 +83,54 @@ Validates JavaScript files. ### Drupal module PHP -Checks that PHP code adheres to the [Drupal coding -standards](https://www.drupal.org/docs/develop/standards). +Validates and audits `composer.json`, checks PHP coding standards and +validates Twig files. + +One job for all of it: the checks share the project's Composer +dependencies, so they are installed once. Each check runs even if an +earlier one fails, so a pull request reports every problem at once; +those needing `vendor` are skipped when the install fails. + +`--no-deps` keeps `docker compose run` from starting the database and cache +services; none of these checks touch them. #### 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`: +2. [ergebnis/composer-normalize](https://github.com/ergebnis/composer-normalize), + [drupal/coder](https://www.drupal.org/project/coder) and + [vincentlanglet/twig-cs-fixer](https://github.com/VincentLanglet/Twig-CS-Fixer) + are dev requirements in `composer.json`: ``` shell - docker compose run --rm phpfpm composer require --dev drupal/coder + docker compose run --rm --no-deps phpfpm composer require --dev ergebnis/composer-normalize + docker compose run --rm --no-deps phpfpm composer require --dev drupal/coder + docker compose run --rm --no-deps phpfpm composer require --dev vincentlanglet/twig-cs-fixer ``` - Clean up and check code by running +#### Composer - ``` shell - docker compose run --rm phpfpm vendor/bin/phpcbf - docker compose run --rm phpfpm vendor/bin/phpcs - ``` +Validates `composer.json`, checks that it is normalized and audits +`composer.lock` for known vulnerabilities. + +Normalize `composer.json` by running + +``` shell +docker compose run --rm --no-deps phpfpm composer normalize +``` + +#### Coding standards + +Checks that PHP code adheres to the [Drupal coding +standards](https://www.drupal.org/docs/develop/standards). + +Clean up and check code by running + +``` shell +docker compose run --rm --no-deps phpfpm vendor/bin/phpcbf +docker compose run --rm --no-deps phpfpm vendor/bin/phpcs +``` > [!NOTE] > The template adds `.phpcs.xml.dist` as [a configuration file for @@ -105,31 +138,63 @@ in `composer.json`: > 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`. +#### Twig + +Validates Twig files. + +A [Configuration +file](https://github.com/VincentLanglet/Twig-CS-Fixer/blob/main/docs/configuration.md#configuration-file) +in the root of the project defines which files to check and rules to use. + --- -[github/workflows/drupal-module/styles.yaml](github/workflows/drupal-module/styles.yaml) +[github/workflows/drupal/lint.yaml](github/workflows/drupal/lint.yaml) + +### Drupal Lint -### Drupal module Styles (CSS and SCSS) +Checks the changelog and lints Markdown, YAML, styles and JavaScript. -Validates styles files. +One job for all of it: a job costs a checkout, an image pull and a minimum +of one billed minute, and none of these checks need the project's +dependencies. Each check runs even if an earlier one fails, so a pull +request reports every problem at once. #### Assumptions -1. A docker compose service named `prettier` for running +1. A docker compose service named `markdownlint` for running `markdownlint` + (from + [markdownlint-cli](https://github.com/igorshubovych/markdownlint-cli)) + exists. +2. A docker compose service named `prettier` for running [Prettier](https://prettier.io/) exists. ---- +#### Changelog -[github/workflows/drupal/javascript.yaml](github/workflows/drupal/javascript.yaml) +Checks that changelog has been updated. -### Drupal JavaScript (and TypeScript) +#### Markdown -Validates JavaScript files. +Lints Markdown files (`**/*.md`) in the project. -#### Assumptions +[markdownlint-cli configuration +files](https://github.com/igorshubovych/markdownlint-cli?tab=readme-ov-file#configuration), +`.markdownlint.jsonc` and `.markdownlintignore`, control what is actually +linted and how. -1. A docker compose service named `prettier` for running - [Prettier](https://prettier.io/) exists. +#### YAML + +Validates YAML files. + +A [Prettier configuration file](https://prettier.io/docs/configuration), +`.prettierrc.yaml`, makes Prettier format Taskfiles the way Task expects. + +#### Styles (CSS and SCSS) + +Validates styles files (`web/themes/custom/**/css/**/*.{css,scss}`). + +#### JavaScript (and TypeScript) + +Validates JavaScript files (`web/themes/custom/**/js/**/*.js`). --- @@ -137,26 +202,54 @@ Validates JavaScript files. ### Drupal PHP -Checks that PHP code adheres to the [Drupal coding -standards](https://www.drupal.org/docs/develop/standards). +Validates and audits `composer.json`, checks PHP coding standards and +validates Twig files. + +One job for all of it: the checks share the project's Composer +dependencies, so they are installed once. Each check runs even if an +earlier one fails, so a pull request reports every problem at once; +those needing `vendor` are skipped when the install fails. + +`--no-deps` keeps `docker compose run` from starting the database and cache +services; none of these checks touch them. #### 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`: +2. [ergebnis/composer-normalize](https://github.com/ergebnis/composer-normalize), + [drupal/coder](https://www.drupal.org/project/coder) and + [vincentlanglet/twig-cs-fixer](https://github.com/VincentLanglet/Twig-CS-Fixer) + are dev requirements in `composer.json`: ``` shell - docker compose run --rm phpfpm composer require --dev drupal/coder + docker compose run --rm --no-deps phpfpm composer require --dev ergebnis/composer-normalize + docker compose run --rm --no-deps phpfpm composer require --dev drupal/coder + docker compose run --rm --no-deps phpfpm composer require --dev vincentlanglet/twig-cs-fixer ``` - Clean up and check code by running +#### Composer - ``` shell - docker compose run --rm phpfpm vendor/bin/phpcbf - docker compose run --rm phpfpm vendor/bin/phpcs - ``` +Validates `composer.json`, checks that it is normalized and audits +`composer.lock` for known vulnerabilities. + +Normalize `composer.json` by running + +``` shell +docker compose run --rm --no-deps phpfpm composer normalize +``` + +#### Coding standards + +Checks that PHP code adheres to the [Drupal coding +standards](https://www.drupal.org/docs/develop/standards). + +Clean up and check code by running + +``` shell +docker compose run --rm --no-deps phpfpm vendor/bin/phpcbf +docker compose run --rm --no-deps phpfpm vendor/bin/phpcs +``` > [!NOTE] > The template adds `.phpcs.xml.dist` as [a configuration file for @@ -164,6 +257,14 @@ in `composer.json`: > 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`. +#### Twig + +Validates Twig files. + +A [Configuration +file](https://github.com/VincentLanglet/Twig-CS-Fixer/blob/main/docs/configuration.md#configuration-file) +in the root of the project defines which files to check and rules to use. + --- [github/workflows/drupal/site.yaml](github/workflows/drupal/site.yaml) @@ -184,22 +285,31 @@ pull request). --- -[github/workflows/drupal/styles.yaml](github/workflows/drupal/styles.yaml) +[github/workflows/symfony/lint.yaml](github/workflows/symfony/lint.yaml) -### Drupal Styles (CSS and SCSS) +### Symfony Lint -Validates styles files. +Checks the changelog and lints Markdown, YAML, styles and JavaScript. + +One job for all of it: a job costs a checkout, an image pull and a minimum +of one billed minute, and none of these checks need the project's +dependencies. Each check runs even if an earlier one fails, so a pull +request reports every problem at once. #### Assumptions -1. A docker compose service named `prettier` for running +1. A docker compose service named `markdownlint` for running `markdownlint` + (from + [markdownlint-cli](https://github.com/igorshubovych/markdownlint-cli)) + exists. +2. A docker compose service named `prettier` for running [Prettier](https://prettier.io/) exists. ---- +#### Changelog -[github/workflows/markdown.yaml](github/workflows/markdown.yaml) +Checks that changelog has been updated. -### Markdown +#### Markdown Lints Markdown files (`**/*.md`) in the project. @@ -208,25 +318,22 @@ files](https://github.com/igorshubovych/markdownlint-cli?tab=readme-ov-file#conf `.markdownlint.jsonc` and `.markdownlintignore`, control what is actually linted and how. -#### Assumptions - -1. A docker compose service named `markdownlint` for running `markdownlint` - (from - [markdownlint-cli](https://github.com/igorshubovych/markdownlint-cli)) - exists. +#### YAML ---- +Validates YAML files. -[github/workflows/symfony/javascript.yaml](github/workflows/symfony/javascript.yaml) +Symfony's YAML config files use 4 spaces for indentation and single quotes. +Therefore we use a [Prettier configuration +file](https://prettier.io/docs/configuration), `.prettierrc.yaml`, to make +Prettier format YAML files in the `config/` folder like Symfony expects. -### Symfony JavaScript (and TypeScript) +#### Styles (CSS and SCSS) -Validates JavaScript files. +Validates styles files (`assets/**/*.{css,scss}`). -#### Assumptions +#### JavaScript (and TypeScript) -1. A docker compose service named `prettier` for running - [Prettier](https://prettier.io/) exists. +Validates JavaScript files (`assets/**/*.js`). --- @@ -234,88 +341,69 @@ Validates JavaScript files. ### Symfony PHP -Checks that PHP code adheres to the [Symfony coding -standards](https://symfony.com/doc/current/contributing/code/standards.html). - -#### Assumptions - -1. A docker compose service named `phpfpm` can be run and `composer` can be - run inside the `phpfpm` service. 2. - [friendsofphp/php-cs-fixer](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer) - is a dev requirement in `composer.json`: - - ``` shell - docker compose run --rm phpfpm composer require --dev friendsofphp/php-cs-fixer - ``` - - Clean up and check code by running - - ``` shell - docker compose run --rm phpfpm vendor/bin/php-cs-fixer fix - docker compose run --rm phpfpm vendor/bin/php-cs-fixer fix --dry-run --diff - ``` - -> [!NOTE] The template adds `.php-cs-fixer.dist.php` as [a configuration -> file for PHP CS -> Fixer](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/blob/master/doc/config.rst) -> and this makes it possible to override the actual configuration used in a -> project by adding a more important configuration file, `.php-cs-fixer.php`. - ---- - -[github/workflows/symfony/styles.yaml](github/workflows/symfony/styles.yaml) - -### Symfony Styles (CSS and SCSS) +Validates and audits `composer.json`, checks PHP coding standards and +validates Twig files. -Validates styles files. +One job for all of it: the checks share the project's Composer +dependencies, so they are installed once. Each check runs even if an +earlier one fails, so a pull request reports every problem at once; +those needing `vendor` are skipped when the install fails. -#### Assumptions - -1. A docker compose service named `prettier` for running - [Prettier](https://prettier.io/) exists. - ---- - -[github/workflows/twig.yaml](github/workflows/twig.yaml) - -### Twig - -Validates Twig files +`--no-deps` keeps `docker compose run` from starting the database and cache +services; none of these checks touch them. #### Assumptions 1. A docker compose service named `phpfpm` can be run and `composer` can be run inside the `phpfpm` service. -2. [vincentlanglet/twig-cs-fixer](https://github.com/VincentLanglet/Twig-CS-Fixer) - is a dev requirement in `composer.json`: +2. [ergebnis/composer-normalize](https://github.com/ergebnis/composer-normalize), + [friendsofphp/php-cs-fixer](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer) and + [vincentlanglet/twig-cs-fixer](https://github.com/VincentLanglet/Twig-CS-Fixer) + are dev requirements in `composer.json`: ``` shell - docker compose run --rm phpfpm composer require --dev vincentlanglet/twig-cs-fixer + docker compose run --rm --no-deps phpfpm composer require --dev ergebnis/composer-normalize + docker compose run --rm --no-deps phpfpm composer require --dev friendsofphp/php-cs-fixer + docker compose run --rm --no-deps phpfpm composer require --dev vincentlanglet/twig-cs-fixer ``` -3. A [Configuration - file](https://github.com/VincentLanglet/Twig-CS-Fixer/blob/main/docs/configuration.md#configuration-file) - in the root of the project defines which files to check and rules to use. +#### Composer ---- +Validates `composer.json`, checks that it is normalized and audits +`composer.lock` for known vulnerabilities. -[github/workflows/yaml.yaml](github/workflows/yaml.yaml) +Normalize `composer.json` by running -### YAML +``` shell +docker compose run --rm --no-deps phpfpm composer normalize +``` -Validates YAML files. +#### Coding standards -#### Assumptions +Checks that PHP code adheres to the [Symfony coding +standards](https://symfony.com/doc/current/contributing/code/standards.html). -1. A docker compose service named `prettier` for running - [Prettier](https://prettier.io/) exists. +Clean up and check code by running -#### Symfony YAML +``` shell +docker compose run --rm --no-deps phpfpm vendor/bin/php-cs-fixer fix +docker compose run --rm --no-deps phpfpm vendor/bin/php-cs-fixer fix --dry-run --diff +``` -Symfony's YAML config files use 4 spaces for indentation and single quotes. -Therefore we use a [Prettier configuration -file](https://prettier.io/docs/configuration), `.prettierrc.yaml`, to make -Prettier format YAML files in the `config/` folder like Symfony expects. +> [!NOTE] +> The template adds `.php-cs-fixer.dist.php` as [a configuration file for +> PHP CS +> Fixer](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/blob/master/doc/config.rst) +> and this makes it possible to override the actual configuration used in a +> project by adding a more important configuration file, `.php-cs-fixer.php`. + +#### Twig + +Validates Twig files. + +A [Configuration +file](https://github.com/VincentLanglet/Twig-CS-Fixer/blob/main/docs/configuration.md#configuration-file) +in the root of the project defines which files to check and rules to use. --- diff --git a/github/workflows/changelog.yaml b/github/workflows/changelog.yaml deleted file mode 100644 index 30d63e7a..00000000 --- a/github/workflows/changelog.yaml +++ /dev/null @@ -1,27 +0,0 @@ -# Do not edit this file! Make a pull request on changing -# github/workflows/changelog.yaml in -# https://github.com/itk-dev/devops_itkdev-docker if need be. - -### ### Changelog -### -### Checks that changelog has been updated - -name: Changelog - -on: - pull_request: - -jobs: - changelog: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v7 - with: - fetch-depth: 2 - - - name: Git fetch - run: git fetch - - - name: Check that changelog has been updated. - run: git diff --exit-code origin/${{ github.base_ref }} -- CHANGELOG.md && exit 1 || exit 0 diff --git a/github/workflows/composer.yaml b/github/workflows/composer.yaml deleted file mode 100644 index b50dadbb..00000000 --- a/github/workflows/composer.yaml +++ /dev/null @@ -1,79 +0,0 @@ -# Do not edit this file! Make a pull request on changing -# github/workflows/composer.yaml in -# https://github.com/itk-dev/devops_itkdev-docker if need be. - -### ### Composer -### -### Validates composer.json and checks that it's normalized. -### -### #### Assumptions -### -### 1. A docker compose service named `phpfpm` can be run and `composer` can be -### run inside the `phpfpm` service. -### 2. [ergebnis/composer-normalize](https://github.com/ergebnis/composer-normalize) -### is a dev requirement in `composer.json`: -### -### ``` shell -### docker compose run --rm phpfpm composer require --dev ergebnis/composer-normalize -### ``` -### -### Normalize `composer.json` by running -### -### ``` shell -### docker compose run --rm phpfpm composer normalize -### ``` - -name: Composer - -env: - COMPOSE_USER: runner - -on: - pull_request: - paths: &paths - - "composer.json" - - "composer.lock" - - "docker-compose.yml" - push: - branches: - - main - - develop - paths: *paths - -jobs: - composer-validate: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v7 - - - name: Create docker network - run: | - docker network create frontend - - - run: | - docker compose run --rm phpfpm composer validate --strict - - composer-normalized: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v7 - - - name: Create docker network - run: | - docker network create frontend - - - run: | - docker compose run --rm phpfpm composer install - docker compose run --rm phpfpm composer normalize --dry-run - - composer-audit: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v7 - - - name: Create docker network - run: | - docker network create frontend - - - run: | - docker compose run --rm phpfpm composer audit --locked diff --git a/github/workflows/drupal-module/javascript.yaml b/github/workflows/drupal-module/javascript.yaml deleted file mode 100644 index beaad0e2..00000000 --- a/github/workflows/drupal-module/javascript.yaml +++ /dev/null @@ -1,39 +0,0 @@ -# Do not edit this file! Make a pull request on changing -# github/workflows/drupal-module/javascript.yaml in -# https://github.com/itk-dev/devops_itkdev-docker if need be. - -### ### Drupal module JavaScript (and TypeScript) -### -### Validates JavaScript files. -### -### #### Assumptions -### -### 1. A docker compose service named `prettier` for running -### [Prettier](https://prettier.io/) exists. - -name: JavaScript - -on: - pull_request: - paths: &paths - - "js/**/*.js" - - "docker-compose.yml" - push: - branches: - - main - - develop - paths: *paths - -jobs: - javascript-lint: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v7 - - - name: Create docker network - run: | - docker network create frontend - - - run: | - docker compose run --rm prettier 'js/**/*.js' --check diff --git a/github/workflows/drupal-module/lint.yaml b/github/workflows/drupal-module/lint.yaml new file mode 100644 index 00000000..80889028 --- /dev/null +++ b/github/workflows/drupal-module/lint.yaml @@ -0,0 +1,94 @@ +# Do not edit this file! Make a pull request on changing +# github/workflows/drupal-module/lint.yaml in +# https://github.com/itk-dev/devops_itkdev-docker if need be. + +### ### Drupal module Lint +### +### Checks the changelog and lints Markdown, YAML, styles and JavaScript. +### +### One job for all of it: a job costs a checkout, an image pull and a minimum +### of one billed minute, and none of these checks need the project's +### dependencies. Each check runs even if an earlier one fails, so a pull +### request reports every problem at once. +### +### #### Assumptions +### +### 1. A docker compose service named `markdownlint` for running `markdownlint` +### (from +### [markdownlint-cli](https://github.com/igorshubovych/markdownlint-cli)) +### exists. +### 2. A docker compose service named `prettier` for running +### [Prettier](https://prettier.io/) exists. +### +### #### Changelog +### +### Checks that changelog has been updated. +### +### #### Markdown +### +### Lints Markdown files (`**/*.md`) in the project. +### +### [markdownlint-cli configuration +### files](https://github.com/igorshubovych/markdownlint-cli?tab=readme-ov-file#configuration), +### `.markdownlint.jsonc` and `.markdownlintignore`, control what is actually +### linted and how. +### +### #### YAML +### +### Validates YAML files. +### +### #### Styles (CSS and SCSS) +### +### Validates styles files (`css/**/*.css`). +### +### #### JavaScript (and TypeScript) +### +### Validates JavaScript files (`js/**/*.js`). + +name: Lint + +on: + pull_request: + push: + branches: + - main + - develop + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v7 + with: + fetch-depth: 2 + + - name: Create docker network + run: | + docker network create frontend + + - name: Check that changelog has been updated + if: "!cancelled() && github.event_name == 'pull_request'" + run: | + git fetch + git diff --exit-code origin/${{ github.base_ref }} -- CHANGELOG.md && exit 1 || exit 0 + + - name: Markdown + if: "!cancelled()" + run: | + docker compose run --rm --no-deps markdownlint markdownlint '**/*.md' + + - name: YAML + if: "!cancelled()" + run: | + docker compose run --rm --no-deps prettier '**/*.{yml,yaml}' --check + + - name: Styles + if: "!cancelled()" + run: | + docker compose run --rm --no-deps prettier 'css/**/*.css' --check + + - name: JavaScript + if: "!cancelled()" + run: | + docker compose run --rm --no-deps prettier 'js/**/*.js' --check diff --git a/github/workflows/drupal-module/php.yaml b/github/workflows/drupal-module/php.yaml index 7d9d5304..7e655574 100644 --- a/github/workflows/drupal-module/php.yaml +++ b/github/workflows/drupal-module/php.yaml @@ -4,32 +4,68 @@ ### ### Drupal module PHP ### -### Checks that PHP code adheres to the [Drupal coding -### standards](https://www.drupal.org/docs/develop/standards). +### Validates and audits `composer.json`, checks PHP coding standards and +### validates Twig files. +### +### One job for all of it: the checks share the project's Composer +### dependencies, so they are installed once. Each check runs even if an +### earlier one fails, so a pull request reports every problem at once; +### those needing `vendor` are skipped when the install fails. +### +### `--no-deps` keeps `docker compose run` from starting the database and cache +### services; none of these checks touch them. ### ### #### 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`: +### 2. [ergebnis/composer-normalize](https://github.com/ergebnis/composer-normalize), +### [drupal/coder](https://www.drupal.org/project/coder) and +### [vincentlanglet/twig-cs-fixer](https://github.com/VincentLanglet/Twig-CS-Fixer) +### are dev requirements in `composer.json`: ### ### ``` shell -### docker compose run --rm phpfpm composer require --dev drupal/coder +### docker compose run --rm --no-deps phpfpm composer require --dev ergebnis/composer-normalize +### docker compose run --rm --no-deps phpfpm composer require --dev drupal/coder +### docker compose run --rm --no-deps phpfpm composer require --dev vincentlanglet/twig-cs-fixer ### ``` ### -### Clean up and check code by running +### #### Composer ### -### ``` shell -### docker compose run --rm phpfpm vendor/bin/phpcbf -### docker compose run --rm phpfpm vendor/bin/phpcs -### ``` +### Validates `composer.json`, checks that it is normalized and audits +### `composer.lock` for known vulnerabilities. +### +### Normalize `composer.json` by running +### +### ``` shell +### docker compose run --rm --no-deps phpfpm composer normalize +### ``` +### +### #### Coding standards +### +### Checks that PHP code adheres to the [Drupal coding +### standards](https://www.drupal.org/docs/develop/standards). +### +### Clean up and check code by running +### +### ``` shell +### docker compose run --rm --no-deps phpfpm vendor/bin/phpcbf +### docker compose run --rm --no-deps 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`. +### +### #### Twig +### +### Validates Twig files. +### +### A [Configuration +### file](https://github.com/VincentLanglet/Twig-CS-Fixer/blob/main/docs/configuration.md#configuration-file) +### in the root of the project defines which files to check and rules to use. name: PHP @@ -40,6 +76,7 @@ on: pull_request: paths: &paths - "**/*.php" + - "**/*.twig" - "composer.json" - "composer.lock" - "docker-compose.yml" @@ -50,16 +87,49 @@ on: paths: *paths jobs: - coding-standards: - name: PHP - Check Coding Standards + php: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v7 + - name: Checkout + uses: actions/checkout@v7 - name: Create docker network run: | docker network create frontend - - run: | - docker compose run --rm phpfpm composer install - docker compose run --rm phpfpm vendor/bin/phpcs + - name: Cache Composer dependencies + uses: actions/cache@v6 + with: + path: vendor + key: composer-${{ hashFiles('composer.lock', 'docker-compose.yml') }} + restore-keys: composer- + + - name: Validate composer.json + run: | + docker compose run --rm --no-deps phpfpm composer validate --strict + + - name: Install dependencies + id: install + if: "!cancelled()" + run: | + docker compose run --rm --no-deps phpfpm composer install + + - name: Check that composer.json is normalized + if: "!cancelled() && steps.install.outcome == 'success'" + run: | + docker compose run --rm --no-deps phpfpm composer normalize --dry-run + + - name: Audit dependencies + if: "!cancelled()" + run: | + docker compose run --rm --no-deps phpfpm composer audit --locked + + - name: Check coding standards + if: "!cancelled() && steps.install.outcome == 'success'" + run: | + docker compose run --rm --no-deps phpfpm vendor/bin/phpcs + + - name: Check Twig files + if: "!cancelled() && steps.install.outcome == 'success'" + run: | + docker compose run --rm --no-deps phpfpm vendor/bin/twig-cs-fixer lint diff --git a/github/workflows/drupal-module/styles.yaml b/github/workflows/drupal-module/styles.yaml deleted file mode 100644 index 29265181..00000000 --- a/github/workflows/drupal-module/styles.yaml +++ /dev/null @@ -1,39 +0,0 @@ -# Do not edit this file! Make a pull request on changing -# github/workflows/drupal-module/styles.yaml in -# https://github.com/itk-dev/devops_itkdev-docker if need be. - -### ### Drupal module Styles (CSS and SCSS) -### -### Validates styles files. -### -### #### Assumptions -### -### 1. A docker compose service named `prettier` for running -### [Prettier](https://prettier.io/) exists. - -name: Styles - -on: - pull_request: - paths: &paths - - "css/**/*.css" - - "docker-compose.yml" - push: - branches: - - main - - develop - paths: *paths - -jobs: - styles-lint: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v7 - - - name: Create docker network - run: | - docker network create frontend - - - run: | - docker compose run --rm prettier 'css/**/*.css' --check diff --git a/github/workflows/drupal/javascript.yaml b/github/workflows/drupal/javascript.yaml deleted file mode 100644 index a4d7e7e9..00000000 --- a/github/workflows/drupal/javascript.yaml +++ /dev/null @@ -1,39 +0,0 @@ -# Do not edit this file! Make a pull request on changing -# github/workflows/drupal/javascript.yaml in -# https://github.com/itk-dev/devops_itkdev-docker if need be. - -### ### Drupal JavaScript (and TypeScript) -### -### Validates JavaScript files. -### -### #### Assumptions -### -### 1. A docker compose service named `prettier` for running -### [Prettier](https://prettier.io/) exists. - -name: JavaScript - -on: - pull_request: - paths: &paths - - "web/themes/custom/**/js/**/*.js" - - "docker-compose.yml" - push: - branches: - - main - - develop - paths: *paths - -jobs: - javascript-lint: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v7 - - - name: Create docker network - run: | - docker network create frontend - - - run: | - docker compose run --rm prettier 'web/themes/custom/**/js/**/*.js' --check diff --git a/github/workflows/drupal/lint.yaml b/github/workflows/drupal/lint.yaml new file mode 100644 index 00000000..b4f0710d --- /dev/null +++ b/github/workflows/drupal/lint.yaml @@ -0,0 +1,97 @@ +# Do not edit this file! Make a pull request on changing +# github/workflows/drupal/lint.yaml in +# https://github.com/itk-dev/devops_itkdev-docker if need be. + +### ### Drupal Lint +### +### Checks the changelog and lints Markdown, YAML, styles and JavaScript. +### +### One job for all of it: a job costs a checkout, an image pull and a minimum +### of one billed minute, and none of these checks need the project's +### dependencies. Each check runs even if an earlier one fails, so a pull +### request reports every problem at once. +### +### #### Assumptions +### +### 1. A docker compose service named `markdownlint` for running `markdownlint` +### (from +### [markdownlint-cli](https://github.com/igorshubovych/markdownlint-cli)) +### exists. +### 2. A docker compose service named `prettier` for running +### [Prettier](https://prettier.io/) exists. +### +### #### Changelog +### +### Checks that changelog has been updated. +### +### #### Markdown +### +### Lints Markdown files (`**/*.md`) in the project. +### +### [markdownlint-cli configuration +### files](https://github.com/igorshubovych/markdownlint-cli?tab=readme-ov-file#configuration), +### `.markdownlint.jsonc` and `.markdownlintignore`, control what is actually +### linted and how. +### +### #### YAML +### +### Validates YAML files. +### +### A [Prettier configuration file](https://prettier.io/docs/configuration), +### `.prettierrc.yaml`, makes Prettier format Taskfiles the way Task expects. +### +### #### Styles (CSS and SCSS) +### +### Validates styles files (`web/themes/custom/**/css/**/*.{css,scss}`). +### +### #### JavaScript (and TypeScript) +### +### Validates JavaScript files (`web/themes/custom/**/js/**/*.js`). + +name: Lint + +on: + pull_request: + push: + branches: + - main + - develop + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v7 + with: + fetch-depth: 2 + + - name: Create docker network + run: | + docker network create frontend + + - name: Check that changelog has been updated + if: "!cancelled() && github.event_name == 'pull_request'" + run: | + git fetch + git diff --exit-code origin/${{ github.base_ref }} -- CHANGELOG.md && exit 1 || exit 0 + + - name: Markdown + if: "!cancelled()" + run: | + docker compose run --rm --no-deps markdownlint markdownlint '**/*.md' + + - name: YAML + if: "!cancelled()" + run: | + docker compose run --rm --no-deps prettier '**/*.{yml,yaml}' --check + + - name: Styles + if: "!cancelled()" + run: | + docker compose run --rm --no-deps prettier 'web/themes/custom/**/css/**/*.{css,scss}' --check + + - name: JavaScript + if: "!cancelled()" + run: | + docker compose run --rm --no-deps prettier 'web/themes/custom/**/js/**/*.js' --check diff --git a/github/workflows/drupal/php.yaml b/github/workflows/drupal/php.yaml index 7d9ec7b2..1380b0f7 100644 --- a/github/workflows/drupal/php.yaml +++ b/github/workflows/drupal/php.yaml @@ -4,32 +4,68 @@ ### ### Drupal PHP ### -### Checks that PHP code adheres to the [Drupal coding -### standards](https://www.drupal.org/docs/develop/standards). +### Validates and audits `composer.json`, checks PHP coding standards and +### validates Twig files. +### +### One job for all of it: the checks share the project's Composer +### dependencies, so they are installed once. Each check runs even if an +### earlier one fails, so a pull request reports every problem at once; +### those needing `vendor` are skipped when the install fails. +### +### `--no-deps` keeps `docker compose run` from starting the database and cache +### services; none of these checks touch them. ### ### #### 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`: +### 2. [ergebnis/composer-normalize](https://github.com/ergebnis/composer-normalize), +### [drupal/coder](https://www.drupal.org/project/coder) and +### [vincentlanglet/twig-cs-fixer](https://github.com/VincentLanglet/Twig-CS-Fixer) +### are dev requirements in `composer.json`: ### ### ``` shell -### docker compose run --rm phpfpm composer require --dev drupal/coder +### docker compose run --rm --no-deps phpfpm composer require --dev ergebnis/composer-normalize +### docker compose run --rm --no-deps phpfpm composer require --dev drupal/coder +### docker compose run --rm --no-deps phpfpm composer require --dev vincentlanglet/twig-cs-fixer ### ``` ### -### Clean up and check code by running +### #### Composer ### -### ``` shell -### docker compose run --rm phpfpm vendor/bin/phpcbf -### docker compose run --rm phpfpm vendor/bin/phpcs -### ``` +### Validates `composer.json`, checks that it is normalized and audits +### `composer.lock` for known vulnerabilities. +### +### Normalize `composer.json` by running +### +### ``` shell +### docker compose run --rm --no-deps phpfpm composer normalize +### ``` +### +### #### Coding standards +### +### Checks that PHP code adheres to the [Drupal coding +### standards](https://www.drupal.org/docs/develop/standards). +### +### Clean up and check code by running +### +### ``` shell +### docker compose run --rm --no-deps phpfpm vendor/bin/phpcbf +### docker compose run --rm --no-deps 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`. +### +### #### Twig +### +### Validates Twig files. +### +### A [Configuration +### file](https://github.com/VincentLanglet/Twig-CS-Fixer/blob/main/docs/configuration.md#configuration-file) +### in the root of the project defines which files to check and rules to use. name: PHP @@ -40,6 +76,7 @@ on: pull_request: paths: &paths - "**/*.php" + - "**/*.twig" - "composer.json" - "composer.lock" - "docker-compose.yml" @@ -50,16 +87,49 @@ on: paths: *paths jobs: - coding-standards: - name: PHP - Check Coding Standards + php: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v7 + - name: Checkout + uses: actions/checkout@v7 - name: Create docker network run: | docker network create frontend - - run: | - docker compose run --rm phpfpm composer install - docker compose run --rm phpfpm vendor/bin/phpcs + - name: Cache Composer dependencies + uses: actions/cache@v6 + with: + path: vendor + key: composer-${{ hashFiles('composer.lock', 'docker-compose.yml') }} + restore-keys: composer- + + - name: Validate composer.json + run: | + docker compose run --rm --no-deps phpfpm composer validate --strict + + - name: Install dependencies + id: install + if: "!cancelled()" + run: | + docker compose run --rm --no-deps phpfpm composer install + + - name: Check that composer.json is normalized + if: "!cancelled() && steps.install.outcome == 'success'" + run: | + docker compose run --rm --no-deps phpfpm composer normalize --dry-run + + - name: Audit dependencies + if: "!cancelled()" + run: | + docker compose run --rm --no-deps phpfpm composer audit --locked + + - name: Check coding standards + if: "!cancelled() && steps.install.outcome == 'success'" + run: | + docker compose run --rm --no-deps phpfpm vendor/bin/phpcs + + - name: Check Twig files + if: "!cancelled() && steps.install.outcome == 'success'" + run: | + docker compose run --rm --no-deps phpfpm vendor/bin/twig-cs-fixer lint diff --git a/github/workflows/drupal/styles.yaml b/github/workflows/drupal/styles.yaml deleted file mode 100644 index b0d68a3a..00000000 --- a/github/workflows/drupal/styles.yaml +++ /dev/null @@ -1,40 +0,0 @@ -# Do not edit this file! Make a pull request on changing -# github/workflows/drupal/styles.yaml in -# https://github.com/itk-dev/devops_itkdev-docker if need be. - -### ### Drupal Styles (CSS and SCSS) -### -### Validates styles files. -### -### #### Assumptions -### -### 1. A docker compose service named `prettier` for running -### [Prettier](https://prettier.io/) exists. - -name: Styles - -on: - pull_request: - paths: &paths - - "web/themes/custom/**/css/**/*.css" - - "web/themes/custom/**/css/**/*.scss" - - "docker-compose.yml" - push: - branches: - - main - - develop - paths: *paths - -jobs: - styles-lint: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v7 - - - name: Create docker network - run: | - docker network create frontend - - - run: | - docker compose run --rm prettier 'web/themes/custom/**/css/**/*.{css,scss}' --check diff --git a/github/workflows/markdown.yaml b/github/workflows/markdown.yaml deleted file mode 100644 index ac0fc212..00000000 --- a/github/workflows/markdown.yaml +++ /dev/null @@ -1,45 +0,0 @@ -# Do not edit this file! Make a pull request on changing -# github/workflows/markdown.yaml in -# https://github.com/itk-dev/devops_itkdev-docker if need be. - -### ### Markdown -### -### Lints Markdown files (`**/*.md`) in the project. -### -### [markdownlint-cli configuration -### files](https://github.com/igorshubovych/markdownlint-cli?tab=readme-ov-file#configuration), -### `.markdownlint.jsonc` and `.markdownlintignore`, control what is actually -### linted and how. -### -### #### Assumptions -### -### 1. A docker compose service named `markdownlint` for running `markdownlint` -### (from -### [markdownlint-cli](https://github.com/igorshubovych/markdownlint-cli)) -### exists. - -name: Markdown - -on: - pull_request: - paths: &paths - - "**/*.md" - push: - branches: - - main - - develop - paths: *paths - -jobs: - markdown-lint: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v7 - - - name: Create docker network - run: | - docker network create frontend - - - run: | - docker compose run --rm markdownlint markdownlint '**/*.md' diff --git a/github/workflows/symfony/javascript.yaml b/github/workflows/symfony/javascript.yaml deleted file mode 100644 index 1a764681..00000000 --- a/github/workflows/symfony/javascript.yaml +++ /dev/null @@ -1,39 +0,0 @@ -# Do not edit this file! Make a pull request on changing -# github/workflows/symfony/javascript.yaml in -# https://github.com/itk-dev/devops_itkdev-docker if need be. - -### ### Symfony JavaScript (and TypeScript) -### -### Validates JavaScript files. -### -### #### Assumptions -### -### 1. A docker compose service named `prettier` for running -### [Prettier](https://prettier.io/) exists. - -name: JavaScript - -on: - pull_request: - paths: &paths - - "assets/**/*.js" - - "docker-compose.yml" - push: - branches: - - main - - develop - paths: *paths - -jobs: - javascript-lint: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v7 - - - name: Create docker network - run: | - docker network create frontend - - - run: | - docker compose run --rm prettier 'assets/**/*.js' --check diff --git a/github/workflows/symfony/lint.yaml b/github/workflows/symfony/lint.yaml new file mode 100644 index 00000000..6265bd02 --- /dev/null +++ b/github/workflows/symfony/lint.yaml @@ -0,0 +1,99 @@ +# Do not edit this file! Make a pull request on changing +# github/workflows/symfony/lint.yaml in +# https://github.com/itk-dev/devops_itkdev-docker if need be. + +### ### Symfony Lint +### +### Checks the changelog and lints Markdown, YAML, styles and JavaScript. +### +### One job for all of it: a job costs a checkout, an image pull and a minimum +### of one billed minute, and none of these checks need the project's +### dependencies. Each check runs even if an earlier one fails, so a pull +### request reports every problem at once. +### +### #### Assumptions +### +### 1. A docker compose service named `markdownlint` for running `markdownlint` +### (from +### [markdownlint-cli](https://github.com/igorshubovych/markdownlint-cli)) +### exists. +### 2. A docker compose service named `prettier` for running +### [Prettier](https://prettier.io/) exists. +### +### #### Changelog +### +### Checks that changelog has been updated. +### +### #### Markdown +### +### Lints Markdown files (`**/*.md`) in the project. +### +### [markdownlint-cli configuration +### files](https://github.com/igorshubovych/markdownlint-cli?tab=readme-ov-file#configuration), +### `.markdownlint.jsonc` and `.markdownlintignore`, control what is actually +### linted and how. +### +### #### YAML +### +### Validates YAML files. +### +### Symfony's YAML config files use 4 spaces for indentation and single quotes. +### Therefore we use a [Prettier configuration +### file](https://prettier.io/docs/configuration), `.prettierrc.yaml`, to make +### Prettier format YAML files in the `config/` folder like Symfony expects. +### +### #### Styles (CSS and SCSS) +### +### Validates styles files (`assets/**/*.{css,scss}`). +### +### #### JavaScript (and TypeScript) +### +### Validates JavaScript files (`assets/**/*.js`). + +name: Lint + +on: + pull_request: + push: + branches: + - main + - develop + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v7 + with: + fetch-depth: 2 + + - name: Create docker network + run: | + docker network create frontend + + - name: Check that changelog has been updated + if: "!cancelled() && github.event_name == 'pull_request'" + run: | + git fetch + git diff --exit-code origin/${{ github.base_ref }} -- CHANGELOG.md && exit 1 || exit 0 + + - name: Markdown + if: "!cancelled()" + run: | + docker compose run --rm --no-deps markdownlint markdownlint '**/*.md' + + - name: YAML + if: "!cancelled()" + run: | + docker compose run --rm --no-deps prettier '**/*.{yml,yaml}' --check + + - name: Styles + if: "!cancelled()" + run: | + docker compose run --rm --no-deps prettier 'assets/**/*.{css,scss}' --check + + - name: JavaScript + if: "!cancelled()" + run: | + docker compose run --rm --no-deps prettier 'assets/**/*.js' --check diff --git a/github/workflows/symfony/php.yaml b/github/workflows/symfony/php.yaml index 6326d8ef..9a71bc7e 100644 --- a/github/workflows/symfony/php.yaml +++ b/github/workflows/symfony/php.yaml @@ -4,34 +4,71 @@ ### ### Symfony PHP ### -### Checks that PHP code adheres to the [Symfony coding -### standards](https://symfony.com/doc/current/contributing/code/standards.html). +### Validates and audits `composer.json`, checks PHP coding standards and +### validates Twig files. +### +### One job for all of it: the checks share the project's Composer +### dependencies, so they are installed once. Each check runs even if an +### earlier one fails, so a pull request reports every problem at once; +### those needing `vendor` are skipped when the install fails. +### +### `--no-deps` keeps `docker compose run` from starting the database and cache +### services; none of these checks touch them. ### ### #### Assumptions ### ### 1. A docker compose service named `phpfpm` can be run and `composer` can be -### run inside the `phpfpm` service. 2. -### [friendsofphp/php-cs-fixer](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer) -### is a dev requirement in `composer.json`: +### run inside the `phpfpm` service. +### 2. [ergebnis/composer-normalize](https://github.com/ergebnis/composer-normalize), +### [friendsofphp/php-cs-fixer](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer) and +### [vincentlanglet/twig-cs-fixer](https://github.com/VincentLanglet/Twig-CS-Fixer) +### are dev requirements in `composer.json`: ### ### ``` shell -### docker compose run --rm phpfpm composer require --dev friendsofphp/php-cs-fixer +### docker compose run --rm --no-deps phpfpm composer require --dev ergebnis/composer-normalize +### docker compose run --rm --no-deps phpfpm composer require --dev friendsofphp/php-cs-fixer +### docker compose run --rm --no-deps phpfpm composer require --dev vincentlanglet/twig-cs-fixer ### ``` ### -### Clean up and check code by running +### #### Composer ### -### ``` shell -### docker compose run --rm phpfpm vendor/bin/php-cs-fixer fix -### docker compose run --rm phpfpm vendor/bin/php-cs-fixer fix --dry-run --diff -### ``` +### Validates `composer.json`, checks that it is normalized and audits +### `composer.lock` for known vulnerabilities. +### +### Normalize `composer.json` by running +### +### ``` shell +### docker compose run --rm --no-deps phpfpm composer normalize +### ``` ### -### > [!NOTE] The template adds `.php-cs-fixer.dist.php` as [a configuration -### > file for PHP CS +### #### Coding standards +### +### Checks that PHP code adheres to the [Symfony coding +### standards](https://symfony.com/doc/current/contributing/code/standards.html). +### +### Clean up and check code by running +### +### ``` shell +### docker compose run --rm --no-deps phpfpm vendor/bin/php-cs-fixer fix +### docker compose run --rm --no-deps phpfpm vendor/bin/php-cs-fixer fix --dry-run --diff +### ``` +### +### > [!NOTE] +### > The template adds `.php-cs-fixer.dist.php` as [a configuration file for +### > PHP CS ### > Fixer](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/blob/master/doc/config.rst) ### > and this makes it possible to override the actual configuration used in a ### > project by adding a more important configuration file, `.php-cs-fixer.php`. +### +### #### Twig +### +### Validates Twig files. +### +### A [Configuration +### file](https://github.com/VincentLanglet/Twig-CS-Fixer/blob/main/docs/configuration.md#configuration-file) +### in the root of the project defines which files to check and rules to use. -name: Symfony PHP +name: PHP env: COMPOSE_USER: runner @@ -40,6 +77,7 @@ on: pull_request: paths: &paths - "**/*.php" + - "**/*.twig" - "composer.json" - "composer.lock" - "docker-compose.yml" @@ -50,17 +88,49 @@ on: paths: *paths jobs: - coding-standards: - name: PHP - Check Coding Standards + php: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v7 + - name: Checkout + uses: actions/checkout@v7 - name: Create docker network run: | docker network create frontend - - run: | - docker compose run --rm phpfpm composer install - # https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/blob/master/doc/usage.rst#the-check-command - docker compose run --rm phpfpm vendor/bin/php-cs-fixer fix --dry-run --diff + - name: Cache Composer dependencies + uses: actions/cache@v6 + with: + path: vendor + key: composer-${{ hashFiles('composer.lock', 'docker-compose.yml') }} + restore-keys: composer- + + - name: Validate composer.json + run: | + docker compose run --rm --no-deps phpfpm composer validate --strict + + - name: Install dependencies + id: install + if: "!cancelled()" + run: | + docker compose run --rm --no-deps phpfpm composer install + + - name: Check that composer.json is normalized + if: "!cancelled() && steps.install.outcome == 'success'" + run: | + docker compose run --rm --no-deps phpfpm composer normalize --dry-run + + - name: Audit dependencies + if: "!cancelled()" + run: | + docker compose run --rm --no-deps phpfpm composer audit --locked + + - name: Check coding standards + if: "!cancelled() && steps.install.outcome == 'success'" + run: | + docker compose run --rm --no-deps phpfpm vendor/bin/php-cs-fixer fix --dry-run --diff + + - name: Check Twig files + if: "!cancelled() && steps.install.outcome == 'success'" + run: | + docker compose run --rm --no-deps phpfpm vendor/bin/twig-cs-fixer lint diff --git a/github/workflows/symfony/styles.yaml b/github/workflows/symfony/styles.yaml deleted file mode 100644 index 2ed954c7..00000000 --- a/github/workflows/symfony/styles.yaml +++ /dev/null @@ -1,40 +0,0 @@ -# Do not edit this file! Make a pull request on changing -# github/workflows/symfony/styles.yaml in -# https://github.com/itk-dev/devops_itkdev-docker if need be. - -### ### Symfony Styles (CSS and SCSS) -### -### Validates styles files. -### -### #### Assumptions -### -### 1. A docker compose service named `prettier` for running -### [Prettier](https://prettier.io/) exists. - -name: Styles - -on: - pull_request: - paths: &paths - - "assets/**/*.css" - - "assets/**/*.scss" - - "docker-compose.yml" - push: - branches: - - main - - develop - paths: *paths - -jobs: - styles-lint: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v7 - - - name: Create docker network - run: | - docker network create frontend - - - run: | - docker compose run --rm prettier 'assets/**/*.{css,scss}' --check diff --git a/github/workflows/twig.yaml b/github/workflows/twig.yaml deleted file mode 100644 index ffb7055d..00000000 --- a/github/workflows/twig.yaml +++ /dev/null @@ -1,55 +0,0 @@ -# Do not edit this file! Make a pull request on changing -# github/workflows/twig.yaml in -# https://github.com/itk-dev/devops_itkdev-docker if need be. - -### ### Twig -### -### Validates Twig files -### -### #### Assumptions -### -### 1. A docker compose service named `phpfpm` can be run and `composer` can be -### run inside the `phpfpm` service. -### 2. [vincentlanglet/twig-cs-fixer](https://github.com/VincentLanglet/Twig-CS-Fixer) -### is a dev requirement in `composer.json`: -### -### ``` shell -### docker compose run --rm phpfpm composer require --dev vincentlanglet/twig-cs-fixer -### ``` -### -### 3. A [Configuration -### file](https://github.com/VincentLanglet/Twig-CS-Fixer/blob/main/docs/configuration.md#configuration-file) -### in the root of the project defines which files to check and rules to use. - -name: Twig - -env: - COMPOSE_USER: runner - -on: - pull_request: - paths: &paths - - "**/*.twig" - - "composer.json" - - "composer.lock" - - "docker-compose.yml" - push: - branches: - - main - - develop - paths: *paths - -jobs: - twig-lint: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v7 - - - name: Create docker network - run: | - docker network create frontend - - - run: | - docker compose run --rm phpfpm composer install - docker compose run --rm phpfpm vendor/bin/twig-cs-fixer lint diff --git a/github/workflows/yaml.yaml b/github/workflows/yaml.yaml deleted file mode 100644 index 827788cf..00000000 --- a/github/workflows/yaml.yaml +++ /dev/null @@ -1,45 +0,0 @@ -# Do not edit this file! Make a pull request on changing -# github/workflows/yaml.yaml in -# https://github.com/itk-dev/devops_itkdev-docker if need be. - -### ### YAML -### -### Validates YAML files. -### -### #### Assumptions -### -### 1. A docker compose service named `prettier` for running -### [Prettier](https://prettier.io/) exists. -### -### #### Symfony YAML -### -### Symfony's YAML config files use 4 spaces for indentation and single quotes. -### Therefore we use a [Prettier configuration -### file](https://prettier.io/docs/configuration), `.prettierrc.yaml`, to make -### Prettier format YAML files in the `config/` folder like Symfony expects. - -name: YAML - -on: - pull_request: - paths: &paths - - "**/*.yml" - - "**/*.yaml" - push: - branches: - - main - - develop - paths: *paths - -jobs: - yaml-lint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v7 - - - name: Create docker network - run: | - docker network create frontend - - - run: | - docker compose run --rm prettier '**/*.{yml,yaml}' --check diff --git a/task/scripts/github-actions-link b/task/scripts/github-actions-link index 04214ed9..adc94078 100755 --- a/task/scripts/github-actions-link +++ b/task/scripts/github-actions-link @@ -7,6 +7,23 @@ project_dir=$(cd "$(dirname "$script_dir")/.." && pwd) cd "$project_dir" || exit +# Configuration folders a workflow needs. A workflow is named after what it is +# concerned with and its configuration lives in a folder of the same name; a +# workflow covering several concerns needs several folders. +function config-topics-for() { + case "$(basename "$1" .yaml)" in + lint) + printf 'markdown\nyaml\n' + ;; + php) + printf 'php\ntwig\n' + ;; + *) + basename "$1" .yaml + ;; + esac +} + # String type (drupal or symfony) from start of name function strip-project-type() { name=$1 @@ -61,25 +78,23 @@ for template_dir in templates/*; do mkdir -p "$target_dir" ln -sf "../../../../github/workflows/$source_file_name" "$target_dir/$(strip-project-type "$source_file_name")" - # Check if we need a language configuration as well - language_name=${source_file_name%.yaml} - config_dir="" - # Check for project_type specific configuration first. - if [ -d "config/$project_type/$language_name" ]; then - config_dir="config/$project_type/$language_name" - elif [ -d "config/$language_name" ]; then - config_dir="config/$language_name" - fi - - if [[ -n "$config_dir" ]]; then - # Some config files are hidden - GLOBIGNORE=".:.." - for config_file in "$config_dir"/*; do - if [ -f "$config_file" ]; then - ln -sf "../../$config_file" "$template_dir/" + # Link the tool configuration each of the workflow's topics needs. The + # generic folder is linked first so a project type specific one of the + # same name wins. + for topic in $(config-topics-for "$source_file_name"); do + for config_dir in "config/$topic" "config/$project_type/$topic"; do + if [ ! -d "$config_dir" ]; then + continue fi + # Some config files are hidden + GLOBIGNORE=".:.." + for config_file in "$config_dir"/*; do + if [ -f "$config_file" ]; then + ln -sf "../../$config_file" "$template_dir/" + fi + done done - fi + done fi done diff --git a/task/templates/github-actions-templates.md b/task/templates/github-actions-templates.md index 078b0354..cdcada8b 100644 --- a/task/templates/github-actions-templates.md +++ b/task/templates/github-actions-templates.md @@ -8,13 +8,17 @@ to match the new templates. ## Naming conventions * A workflow file is named after what it is _concerned_ with, not _how_ it's concerned with it and which tools are - actually used, i.e. we have a [`markdown.yaml`](github/workflows/markdown.yaml) file and not a `markdownlint.yaml` - file. -* Some workflows are specific to a project type, currently `drupal` or `symfony`, and these sit in a project type - subfolder, e.g. `github/workflows/drupal`. + actually used, i.e. we have a [`lint.yaml`](github/workflows/symfony/lint.yaml) file and not a `prettier.yaml` file. +* A workflow covers several concerns that share a container and a checkout, so startup costs are paid once: + `lint.yaml` runs the checks needing no project dependencies, `php.yaml` those needing the Composer dependencies. +* Workflows sit in a project type subfolder, currently `drupal`, `drupal-module` or `symfony`, e.g. + `github/workflows/drupal`. * Some tools require configuration files, and these sit in the `config` folder. Some tool configuration may be specific to a project type (or make sence only for a specific project type), and these specific config files sit in a project type subfolder, e.g. `config/drupal/php/.phpcs.xml.dist` and `config/drupal/twig/.twig-cs-fixer.dist.php` +* A workflow covering several concerns needs the configuration of each of them. `config-topics-for` in + [`task/scripts/github-actions-link`](task/scripts/github-actions-link) maps a workflow name to its configuration + folders, e.g. `php.yaml` to both `php` and `twig`. ## Templates diff --git a/templates/drupal-10/.github/workflows/changelog.yaml b/templates/drupal-10/.github/workflows/changelog.yaml deleted file mode 120000 index 5ffe5c3c..00000000 --- a/templates/drupal-10/.github/workflows/changelog.yaml +++ /dev/null @@ -1 +0,0 @@ -../../../../github/workflows/changelog.yaml \ No newline at end of file diff --git a/templates/drupal-10/.github/workflows/composer.yaml b/templates/drupal-10/.github/workflows/composer.yaml deleted file mode 120000 index 23955648..00000000 --- a/templates/drupal-10/.github/workflows/composer.yaml +++ /dev/null @@ -1 +0,0 @@ -../../../../github/workflows/composer.yaml \ No newline at end of file diff --git a/templates/drupal-10/.github/workflows/javascript.yaml b/templates/drupal-10/.github/workflows/javascript.yaml deleted file mode 120000 index e76b3a56..00000000 --- a/templates/drupal-10/.github/workflows/javascript.yaml +++ /dev/null @@ -1 +0,0 @@ -../../../../github/workflows/drupal/javascript.yaml \ No newline at end of file diff --git a/templates/drupal-10/.github/workflows/lint.yaml b/templates/drupal-10/.github/workflows/lint.yaml new file mode 120000 index 00000000..b9f0039d --- /dev/null +++ b/templates/drupal-10/.github/workflows/lint.yaml @@ -0,0 +1 @@ +../../../../github/workflows/drupal/lint.yaml \ No newline at end of file diff --git a/templates/drupal-10/.github/workflows/markdown.yaml b/templates/drupal-10/.github/workflows/markdown.yaml deleted file mode 120000 index ab3eafad..00000000 --- a/templates/drupal-10/.github/workflows/markdown.yaml +++ /dev/null @@ -1 +0,0 @@ -../../../../github/workflows/markdown.yaml \ No newline at end of file diff --git a/templates/drupal-10/.github/workflows/styles.yaml b/templates/drupal-10/.github/workflows/styles.yaml deleted file mode 120000 index b3e30b71..00000000 --- a/templates/drupal-10/.github/workflows/styles.yaml +++ /dev/null @@ -1 +0,0 @@ -../../../../github/workflows/drupal/styles.yaml \ No newline at end of file diff --git a/templates/drupal-10/.github/workflows/twig.yaml b/templates/drupal-10/.github/workflows/twig.yaml deleted file mode 120000 index 649f1cd6..00000000 --- a/templates/drupal-10/.github/workflows/twig.yaml +++ /dev/null @@ -1 +0,0 @@ -../../../../github/workflows/twig.yaml \ No newline at end of file diff --git a/templates/drupal-10/.github/workflows/yaml.yaml b/templates/drupal-10/.github/workflows/yaml.yaml deleted file mode 120000 index 725a7d68..00000000 --- a/templates/drupal-10/.github/workflows/yaml.yaml +++ /dev/null @@ -1 +0,0 @@ -../../../../github/workflows/yaml.yaml \ No newline at end of file diff --git a/templates/drupal-11/.github/workflows/changelog.yaml b/templates/drupal-11/.github/workflows/changelog.yaml deleted file mode 120000 index 5ffe5c3c..00000000 --- a/templates/drupal-11/.github/workflows/changelog.yaml +++ /dev/null @@ -1 +0,0 @@ -../../../../github/workflows/changelog.yaml \ No newline at end of file diff --git a/templates/drupal-11/.github/workflows/composer.yaml b/templates/drupal-11/.github/workflows/composer.yaml deleted file mode 120000 index 23955648..00000000 --- a/templates/drupal-11/.github/workflows/composer.yaml +++ /dev/null @@ -1 +0,0 @@ -../../../../github/workflows/composer.yaml \ No newline at end of file diff --git a/templates/drupal-11/.github/workflows/javascript.yaml b/templates/drupal-11/.github/workflows/javascript.yaml deleted file mode 120000 index e76b3a56..00000000 --- a/templates/drupal-11/.github/workflows/javascript.yaml +++ /dev/null @@ -1 +0,0 @@ -../../../../github/workflows/drupal/javascript.yaml \ No newline at end of file diff --git a/templates/drupal-11/.github/workflows/lint.yaml b/templates/drupal-11/.github/workflows/lint.yaml new file mode 120000 index 00000000..b9f0039d --- /dev/null +++ b/templates/drupal-11/.github/workflows/lint.yaml @@ -0,0 +1 @@ +../../../../github/workflows/drupal/lint.yaml \ No newline at end of file diff --git a/templates/drupal-11/.github/workflows/markdown.yaml b/templates/drupal-11/.github/workflows/markdown.yaml deleted file mode 120000 index ab3eafad..00000000 --- a/templates/drupal-11/.github/workflows/markdown.yaml +++ /dev/null @@ -1 +0,0 @@ -../../../../github/workflows/markdown.yaml \ No newline at end of file diff --git a/templates/drupal-11/.github/workflows/styles.yaml b/templates/drupal-11/.github/workflows/styles.yaml deleted file mode 120000 index b3e30b71..00000000 --- a/templates/drupal-11/.github/workflows/styles.yaml +++ /dev/null @@ -1 +0,0 @@ -../../../../github/workflows/drupal/styles.yaml \ No newline at end of file diff --git a/templates/drupal-11/.github/workflows/twig.yaml b/templates/drupal-11/.github/workflows/twig.yaml deleted file mode 120000 index 649f1cd6..00000000 --- a/templates/drupal-11/.github/workflows/twig.yaml +++ /dev/null @@ -1 +0,0 @@ -../../../../github/workflows/twig.yaml \ No newline at end of file diff --git a/templates/drupal-11/.github/workflows/yaml.yaml b/templates/drupal-11/.github/workflows/yaml.yaml deleted file mode 120000 index 725a7d68..00000000 --- a/templates/drupal-11/.github/workflows/yaml.yaml +++ /dev/null @@ -1 +0,0 @@ -../../../../github/workflows/yaml.yaml \ No newline at end of file diff --git a/templates/drupal-8/.github/workflows/changelog.yaml b/templates/drupal-8/.github/workflows/changelog.yaml deleted file mode 120000 index 5ffe5c3c..00000000 --- a/templates/drupal-8/.github/workflows/changelog.yaml +++ /dev/null @@ -1 +0,0 @@ -../../../../github/workflows/changelog.yaml \ No newline at end of file diff --git a/templates/drupal-8/.github/workflows/composer.yaml b/templates/drupal-8/.github/workflows/composer.yaml deleted file mode 120000 index 23955648..00000000 --- a/templates/drupal-8/.github/workflows/composer.yaml +++ /dev/null @@ -1 +0,0 @@ -../../../../github/workflows/composer.yaml \ No newline at end of file diff --git a/templates/drupal-8/.github/workflows/javascript.yaml b/templates/drupal-8/.github/workflows/javascript.yaml deleted file mode 120000 index e76b3a56..00000000 --- a/templates/drupal-8/.github/workflows/javascript.yaml +++ /dev/null @@ -1 +0,0 @@ -../../../../github/workflows/drupal/javascript.yaml \ No newline at end of file diff --git a/templates/drupal-8/.github/workflows/lint.yaml b/templates/drupal-8/.github/workflows/lint.yaml new file mode 120000 index 00000000..b9f0039d --- /dev/null +++ b/templates/drupal-8/.github/workflows/lint.yaml @@ -0,0 +1 @@ +../../../../github/workflows/drupal/lint.yaml \ No newline at end of file diff --git a/templates/drupal-8/.github/workflows/markdown.yaml b/templates/drupal-8/.github/workflows/markdown.yaml deleted file mode 120000 index ab3eafad..00000000 --- a/templates/drupal-8/.github/workflows/markdown.yaml +++ /dev/null @@ -1 +0,0 @@ -../../../../github/workflows/markdown.yaml \ No newline at end of file diff --git a/templates/drupal-8/.github/workflows/styles.yaml b/templates/drupal-8/.github/workflows/styles.yaml deleted file mode 120000 index b3e30b71..00000000 --- a/templates/drupal-8/.github/workflows/styles.yaml +++ /dev/null @@ -1 +0,0 @@ -../../../../github/workflows/drupal/styles.yaml \ No newline at end of file diff --git a/templates/drupal-8/.github/workflows/twig.yaml b/templates/drupal-8/.github/workflows/twig.yaml deleted file mode 120000 index 649f1cd6..00000000 --- a/templates/drupal-8/.github/workflows/twig.yaml +++ /dev/null @@ -1 +0,0 @@ -../../../../github/workflows/twig.yaml \ No newline at end of file diff --git a/templates/drupal-8/.github/workflows/yaml.yaml b/templates/drupal-8/.github/workflows/yaml.yaml deleted file mode 120000 index 725a7d68..00000000 --- a/templates/drupal-8/.github/workflows/yaml.yaml +++ /dev/null @@ -1 +0,0 @@ -../../../../github/workflows/yaml.yaml \ No newline at end of file diff --git a/templates/drupal-9/.github/workflows/changelog.yaml b/templates/drupal-9/.github/workflows/changelog.yaml deleted file mode 120000 index 5ffe5c3c..00000000 --- a/templates/drupal-9/.github/workflows/changelog.yaml +++ /dev/null @@ -1 +0,0 @@ -../../../../github/workflows/changelog.yaml \ No newline at end of file diff --git a/templates/drupal-9/.github/workflows/composer.yaml b/templates/drupal-9/.github/workflows/composer.yaml deleted file mode 120000 index 23955648..00000000 --- a/templates/drupal-9/.github/workflows/composer.yaml +++ /dev/null @@ -1 +0,0 @@ -../../../../github/workflows/composer.yaml \ No newline at end of file diff --git a/templates/drupal-9/.github/workflows/javascript.yaml b/templates/drupal-9/.github/workflows/javascript.yaml deleted file mode 120000 index e76b3a56..00000000 --- a/templates/drupal-9/.github/workflows/javascript.yaml +++ /dev/null @@ -1 +0,0 @@ -../../../../github/workflows/drupal/javascript.yaml \ No newline at end of file diff --git a/templates/drupal-9/.github/workflows/lint.yaml b/templates/drupal-9/.github/workflows/lint.yaml new file mode 120000 index 00000000..b9f0039d --- /dev/null +++ b/templates/drupal-9/.github/workflows/lint.yaml @@ -0,0 +1 @@ +../../../../github/workflows/drupal/lint.yaml \ No newline at end of file diff --git a/templates/drupal-9/.github/workflows/markdown.yaml b/templates/drupal-9/.github/workflows/markdown.yaml deleted file mode 120000 index ab3eafad..00000000 --- a/templates/drupal-9/.github/workflows/markdown.yaml +++ /dev/null @@ -1 +0,0 @@ -../../../../github/workflows/markdown.yaml \ No newline at end of file diff --git a/templates/drupal-9/.github/workflows/styles.yaml b/templates/drupal-9/.github/workflows/styles.yaml deleted file mode 120000 index b3e30b71..00000000 --- a/templates/drupal-9/.github/workflows/styles.yaml +++ /dev/null @@ -1 +0,0 @@ -../../../../github/workflows/drupal/styles.yaml \ No newline at end of file diff --git a/templates/drupal-9/.github/workflows/twig.yaml b/templates/drupal-9/.github/workflows/twig.yaml deleted file mode 120000 index 649f1cd6..00000000 --- a/templates/drupal-9/.github/workflows/twig.yaml +++ /dev/null @@ -1 +0,0 @@ -../../../../github/workflows/twig.yaml \ No newline at end of file diff --git a/templates/drupal-9/.github/workflows/yaml.yaml b/templates/drupal-9/.github/workflows/yaml.yaml deleted file mode 120000 index 725a7d68..00000000 --- a/templates/drupal-9/.github/workflows/yaml.yaml +++ /dev/null @@ -1 +0,0 @@ -../../../../github/workflows/yaml.yaml \ No newline at end of file diff --git a/templates/drupal-module/.github/workflows/changelog.yaml b/templates/drupal-module/.github/workflows/changelog.yaml deleted file mode 120000 index 5ffe5c3c..00000000 --- a/templates/drupal-module/.github/workflows/changelog.yaml +++ /dev/null @@ -1 +0,0 @@ -../../../../github/workflows/changelog.yaml \ No newline at end of file diff --git a/templates/drupal-module/.github/workflows/composer.yaml b/templates/drupal-module/.github/workflows/composer.yaml deleted file mode 120000 index 23955648..00000000 --- a/templates/drupal-module/.github/workflows/composer.yaml +++ /dev/null @@ -1 +0,0 @@ -../../../../github/workflows/composer.yaml \ No newline at end of file diff --git a/templates/drupal-module/.github/workflows/javascript.yaml b/templates/drupal-module/.github/workflows/javascript.yaml deleted file mode 120000 index 09fb93cd..00000000 --- a/templates/drupal-module/.github/workflows/javascript.yaml +++ /dev/null @@ -1 +0,0 @@ -../../../../github/workflows/drupal-module/javascript.yaml \ No newline at end of file diff --git a/templates/drupal-module/.github/workflows/lint.yaml b/templates/drupal-module/.github/workflows/lint.yaml new file mode 120000 index 00000000..437eee35 --- /dev/null +++ b/templates/drupal-module/.github/workflows/lint.yaml @@ -0,0 +1 @@ +../../../../github/workflows/drupal-module/lint.yaml \ No newline at end of file diff --git a/templates/drupal-module/.github/workflows/markdown.yaml b/templates/drupal-module/.github/workflows/markdown.yaml deleted file mode 120000 index ab3eafad..00000000 --- a/templates/drupal-module/.github/workflows/markdown.yaml +++ /dev/null @@ -1 +0,0 @@ -../../../../github/workflows/markdown.yaml \ No newline at end of file diff --git a/templates/drupal-module/.github/workflows/styles.yaml b/templates/drupal-module/.github/workflows/styles.yaml deleted file mode 120000 index 31ec0309..00000000 --- a/templates/drupal-module/.github/workflows/styles.yaml +++ /dev/null @@ -1 +0,0 @@ -../../../../github/workflows/drupal-module/styles.yaml \ No newline at end of file diff --git a/templates/drupal-module/.github/workflows/twig.yaml b/templates/drupal-module/.github/workflows/twig.yaml deleted file mode 120000 index 649f1cd6..00000000 --- a/templates/drupal-module/.github/workflows/twig.yaml +++ /dev/null @@ -1 +0,0 @@ -../../../../github/workflows/twig.yaml \ No newline at end of file diff --git a/templates/drupal-module/.github/workflows/yaml.yaml b/templates/drupal-module/.github/workflows/yaml.yaml deleted file mode 120000 index 725a7d68..00000000 --- a/templates/drupal-module/.github/workflows/yaml.yaml +++ /dev/null @@ -1 +0,0 @@ -../../../../github/workflows/yaml.yaml \ No newline at end of file diff --git a/templates/drupal/.github/workflows/changelog.yaml b/templates/drupal/.github/workflows/changelog.yaml deleted file mode 120000 index 5ffe5c3c..00000000 --- a/templates/drupal/.github/workflows/changelog.yaml +++ /dev/null @@ -1 +0,0 @@ -../../../../github/workflows/changelog.yaml \ No newline at end of file diff --git a/templates/drupal/.github/workflows/composer.yaml b/templates/drupal/.github/workflows/composer.yaml deleted file mode 120000 index 23955648..00000000 --- a/templates/drupal/.github/workflows/composer.yaml +++ /dev/null @@ -1 +0,0 @@ -../../../../github/workflows/composer.yaml \ No newline at end of file diff --git a/templates/drupal/.github/workflows/javascript.yaml b/templates/drupal/.github/workflows/javascript.yaml deleted file mode 120000 index e76b3a56..00000000 --- a/templates/drupal/.github/workflows/javascript.yaml +++ /dev/null @@ -1 +0,0 @@ -../../../../github/workflows/drupal/javascript.yaml \ No newline at end of file diff --git a/templates/drupal/.github/workflows/lint.yaml b/templates/drupal/.github/workflows/lint.yaml new file mode 120000 index 00000000..b9f0039d --- /dev/null +++ b/templates/drupal/.github/workflows/lint.yaml @@ -0,0 +1 @@ +../../../../github/workflows/drupal/lint.yaml \ No newline at end of file diff --git a/templates/drupal/.github/workflows/markdown.yaml b/templates/drupal/.github/workflows/markdown.yaml deleted file mode 120000 index ab3eafad..00000000 --- a/templates/drupal/.github/workflows/markdown.yaml +++ /dev/null @@ -1 +0,0 @@ -../../../../github/workflows/markdown.yaml \ No newline at end of file diff --git a/templates/drupal/.github/workflows/styles.yaml b/templates/drupal/.github/workflows/styles.yaml deleted file mode 120000 index b3e30b71..00000000 --- a/templates/drupal/.github/workflows/styles.yaml +++ /dev/null @@ -1 +0,0 @@ -../../../../github/workflows/drupal/styles.yaml \ No newline at end of file diff --git a/templates/drupal/.github/workflows/twig.yaml b/templates/drupal/.github/workflows/twig.yaml deleted file mode 120000 index 649f1cd6..00000000 --- a/templates/drupal/.github/workflows/twig.yaml +++ /dev/null @@ -1 +0,0 @@ -../../../../github/workflows/twig.yaml \ No newline at end of file diff --git a/templates/drupal/.github/workflows/yaml.yaml b/templates/drupal/.github/workflows/yaml.yaml deleted file mode 120000 index 725a7d68..00000000 --- a/templates/drupal/.github/workflows/yaml.yaml +++ /dev/null @@ -1 +0,0 @@ -../../../../github/workflows/yaml.yaml \ No newline at end of file diff --git a/templates/symfony-6/.github/workflows/changelog.yaml b/templates/symfony-6/.github/workflows/changelog.yaml deleted file mode 120000 index 5ffe5c3c..00000000 --- a/templates/symfony-6/.github/workflows/changelog.yaml +++ /dev/null @@ -1 +0,0 @@ -../../../../github/workflows/changelog.yaml \ No newline at end of file diff --git a/templates/symfony-6/.github/workflows/composer.yaml b/templates/symfony-6/.github/workflows/composer.yaml deleted file mode 120000 index 23955648..00000000 --- a/templates/symfony-6/.github/workflows/composer.yaml +++ /dev/null @@ -1 +0,0 @@ -../../../../github/workflows/composer.yaml \ No newline at end of file diff --git a/templates/symfony-6/.github/workflows/javascript.yaml b/templates/symfony-6/.github/workflows/javascript.yaml deleted file mode 120000 index 32f4e115..00000000 --- a/templates/symfony-6/.github/workflows/javascript.yaml +++ /dev/null @@ -1 +0,0 @@ -../../../../github/workflows/symfony/javascript.yaml \ No newline at end of file diff --git a/templates/symfony-6/.github/workflows/lint.yaml b/templates/symfony-6/.github/workflows/lint.yaml new file mode 120000 index 00000000..55df9278 --- /dev/null +++ b/templates/symfony-6/.github/workflows/lint.yaml @@ -0,0 +1 @@ +../../../../github/workflows/symfony/lint.yaml \ No newline at end of file diff --git a/templates/symfony-6/.github/workflows/markdown.yaml b/templates/symfony-6/.github/workflows/markdown.yaml deleted file mode 120000 index ab3eafad..00000000 --- a/templates/symfony-6/.github/workflows/markdown.yaml +++ /dev/null @@ -1 +0,0 @@ -../../../../github/workflows/markdown.yaml \ No newline at end of file diff --git a/templates/symfony-6/.github/workflows/styles.yaml b/templates/symfony-6/.github/workflows/styles.yaml deleted file mode 120000 index af396b48..00000000 --- a/templates/symfony-6/.github/workflows/styles.yaml +++ /dev/null @@ -1 +0,0 @@ -../../../../github/workflows/symfony/styles.yaml \ No newline at end of file diff --git a/templates/symfony-6/.github/workflows/twig.yaml b/templates/symfony-6/.github/workflows/twig.yaml deleted file mode 120000 index 649f1cd6..00000000 --- a/templates/symfony-6/.github/workflows/twig.yaml +++ /dev/null @@ -1 +0,0 @@ -../../../../github/workflows/twig.yaml \ No newline at end of file diff --git a/templates/symfony-6/.github/workflows/yaml.yaml b/templates/symfony-6/.github/workflows/yaml.yaml deleted file mode 120000 index 725a7d68..00000000 --- a/templates/symfony-6/.github/workflows/yaml.yaml +++ /dev/null @@ -1 +0,0 @@ -../../../../github/workflows/yaml.yaml \ No newline at end of file diff --git a/templates/symfony-7/.github/workflows/changelog.yaml b/templates/symfony-7/.github/workflows/changelog.yaml deleted file mode 120000 index 5ffe5c3c..00000000 --- a/templates/symfony-7/.github/workflows/changelog.yaml +++ /dev/null @@ -1 +0,0 @@ -../../../../github/workflows/changelog.yaml \ No newline at end of file diff --git a/templates/symfony-7/.github/workflows/composer.yaml b/templates/symfony-7/.github/workflows/composer.yaml deleted file mode 120000 index 23955648..00000000 --- a/templates/symfony-7/.github/workflows/composer.yaml +++ /dev/null @@ -1 +0,0 @@ -../../../../github/workflows/composer.yaml \ No newline at end of file diff --git a/templates/symfony-7/.github/workflows/javascript.yaml b/templates/symfony-7/.github/workflows/javascript.yaml deleted file mode 120000 index 32f4e115..00000000 --- a/templates/symfony-7/.github/workflows/javascript.yaml +++ /dev/null @@ -1 +0,0 @@ -../../../../github/workflows/symfony/javascript.yaml \ No newline at end of file diff --git a/templates/symfony-7/.github/workflows/lint.yaml b/templates/symfony-7/.github/workflows/lint.yaml new file mode 120000 index 00000000..55df9278 --- /dev/null +++ b/templates/symfony-7/.github/workflows/lint.yaml @@ -0,0 +1 @@ +../../../../github/workflows/symfony/lint.yaml \ No newline at end of file diff --git a/templates/symfony-7/.github/workflows/markdown.yaml b/templates/symfony-7/.github/workflows/markdown.yaml deleted file mode 120000 index ab3eafad..00000000 --- a/templates/symfony-7/.github/workflows/markdown.yaml +++ /dev/null @@ -1 +0,0 @@ -../../../../github/workflows/markdown.yaml \ No newline at end of file diff --git a/templates/symfony-7/.github/workflows/styles.yaml b/templates/symfony-7/.github/workflows/styles.yaml deleted file mode 120000 index af396b48..00000000 --- a/templates/symfony-7/.github/workflows/styles.yaml +++ /dev/null @@ -1 +0,0 @@ -../../../../github/workflows/symfony/styles.yaml \ No newline at end of file diff --git a/templates/symfony-7/.github/workflows/twig.yaml b/templates/symfony-7/.github/workflows/twig.yaml deleted file mode 120000 index 649f1cd6..00000000 --- a/templates/symfony-7/.github/workflows/twig.yaml +++ /dev/null @@ -1 +0,0 @@ -../../../../github/workflows/twig.yaml \ No newline at end of file diff --git a/templates/symfony-7/.github/workflows/yaml.yaml b/templates/symfony-7/.github/workflows/yaml.yaml deleted file mode 120000 index 725a7d68..00000000 --- a/templates/symfony-7/.github/workflows/yaml.yaml +++ /dev/null @@ -1 +0,0 @@ -../../../../github/workflows/yaml.yaml \ No newline at end of file diff --git a/templates/symfony-8/.github/workflows/changelog.yaml b/templates/symfony-8/.github/workflows/changelog.yaml deleted file mode 120000 index 5ffe5c3c..00000000 --- a/templates/symfony-8/.github/workflows/changelog.yaml +++ /dev/null @@ -1 +0,0 @@ -../../../../github/workflows/changelog.yaml \ No newline at end of file diff --git a/templates/symfony-8/.github/workflows/composer.yaml b/templates/symfony-8/.github/workflows/composer.yaml deleted file mode 120000 index 23955648..00000000 --- a/templates/symfony-8/.github/workflows/composer.yaml +++ /dev/null @@ -1 +0,0 @@ -../../../../github/workflows/composer.yaml \ No newline at end of file diff --git a/templates/symfony-8/.github/workflows/javascript.yaml b/templates/symfony-8/.github/workflows/javascript.yaml deleted file mode 120000 index 32f4e115..00000000 --- a/templates/symfony-8/.github/workflows/javascript.yaml +++ /dev/null @@ -1 +0,0 @@ -../../../../github/workflows/symfony/javascript.yaml \ No newline at end of file diff --git a/templates/symfony-8/.github/workflows/lint.yaml b/templates/symfony-8/.github/workflows/lint.yaml new file mode 120000 index 00000000..55df9278 --- /dev/null +++ b/templates/symfony-8/.github/workflows/lint.yaml @@ -0,0 +1 @@ +../../../../github/workflows/symfony/lint.yaml \ No newline at end of file diff --git a/templates/symfony-8/.github/workflows/markdown.yaml b/templates/symfony-8/.github/workflows/markdown.yaml deleted file mode 120000 index ab3eafad..00000000 --- a/templates/symfony-8/.github/workflows/markdown.yaml +++ /dev/null @@ -1 +0,0 @@ -../../../../github/workflows/markdown.yaml \ No newline at end of file diff --git a/templates/symfony-8/.github/workflows/styles.yaml b/templates/symfony-8/.github/workflows/styles.yaml deleted file mode 120000 index af396b48..00000000 --- a/templates/symfony-8/.github/workflows/styles.yaml +++ /dev/null @@ -1 +0,0 @@ -../../../../github/workflows/symfony/styles.yaml \ No newline at end of file diff --git a/templates/symfony-8/.github/workflows/twig.yaml b/templates/symfony-8/.github/workflows/twig.yaml deleted file mode 120000 index 649f1cd6..00000000 --- a/templates/symfony-8/.github/workflows/twig.yaml +++ /dev/null @@ -1 +0,0 @@ -../../../../github/workflows/twig.yaml \ No newline at end of file diff --git a/templates/symfony-8/.github/workflows/yaml.yaml b/templates/symfony-8/.github/workflows/yaml.yaml deleted file mode 120000 index 725a7d68..00000000 --- a/templates/symfony-8/.github/workflows/yaml.yaml +++ /dev/null @@ -1 +0,0 @@ -../../../../github/workflows/yaml.yaml \ No newline at end of file diff --git a/templates/symfony/.github/workflows/changelog.yaml b/templates/symfony/.github/workflows/changelog.yaml deleted file mode 120000 index 5ffe5c3c..00000000 --- a/templates/symfony/.github/workflows/changelog.yaml +++ /dev/null @@ -1 +0,0 @@ -../../../../github/workflows/changelog.yaml \ No newline at end of file diff --git a/templates/symfony/.github/workflows/composer.yaml b/templates/symfony/.github/workflows/composer.yaml deleted file mode 120000 index 23955648..00000000 --- a/templates/symfony/.github/workflows/composer.yaml +++ /dev/null @@ -1 +0,0 @@ -../../../../github/workflows/composer.yaml \ No newline at end of file diff --git a/templates/symfony/.github/workflows/javascript.yaml b/templates/symfony/.github/workflows/javascript.yaml deleted file mode 120000 index 32f4e115..00000000 --- a/templates/symfony/.github/workflows/javascript.yaml +++ /dev/null @@ -1 +0,0 @@ -../../../../github/workflows/symfony/javascript.yaml \ No newline at end of file diff --git a/templates/symfony/.github/workflows/lint.yaml b/templates/symfony/.github/workflows/lint.yaml new file mode 120000 index 00000000..55df9278 --- /dev/null +++ b/templates/symfony/.github/workflows/lint.yaml @@ -0,0 +1 @@ +../../../../github/workflows/symfony/lint.yaml \ No newline at end of file diff --git a/templates/symfony/.github/workflows/markdown.yaml b/templates/symfony/.github/workflows/markdown.yaml deleted file mode 120000 index ab3eafad..00000000 --- a/templates/symfony/.github/workflows/markdown.yaml +++ /dev/null @@ -1 +0,0 @@ -../../../../github/workflows/markdown.yaml \ No newline at end of file diff --git a/templates/symfony/.github/workflows/styles.yaml b/templates/symfony/.github/workflows/styles.yaml deleted file mode 120000 index af396b48..00000000 --- a/templates/symfony/.github/workflows/styles.yaml +++ /dev/null @@ -1 +0,0 @@ -../../../../github/workflows/symfony/styles.yaml \ No newline at end of file diff --git a/templates/symfony/.github/workflows/twig.yaml b/templates/symfony/.github/workflows/twig.yaml deleted file mode 120000 index 649f1cd6..00000000 --- a/templates/symfony/.github/workflows/twig.yaml +++ /dev/null @@ -1 +0,0 @@ -../../../../github/workflows/twig.yaml \ No newline at end of file diff --git a/templates/symfony/.github/workflows/yaml.yaml b/templates/symfony/.github/workflows/yaml.yaml deleted file mode 120000 index 725a7d68..00000000 --- a/templates/symfony/.github/workflows/yaml.yaml +++ /dev/null @@ -1 +0,0 @@ -../../../../github/workflows/yaml.yaml \ No newline at end of file