Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Drupal editor configuration normalization
# Editor configuration normalization
# @see http://editorconfig.org/

# This is the top-most .editorconfig file; do not search in parent directories.
Expand All @@ -8,13 +8,13 @@ root = true
[*]
end_of_line = LF
indent_style = space
indent_size = 4
indent_size = 2
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.{js,jsx,scss}]
indent_size = 2
[config/**.{yml,yaml}]
indent_size = 4

[docker-compose*.yml]
indent_size = 2
[*.php]
indent_size = 4
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
COMPOSE_PROJECT_NAME=display
COMPOSE_DOMAIN=display.local.itkdev.dk
ITKDEV_TEMPLATE=symfony-6

# In all environments, the following files are loaded if they exist,
# the latter taking precedence over the former:
Expand Down
6 changes: 3 additions & 3 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#### Link to ticket
#### Link to issue

Please add a link to the ticket being addressed by this change.
Please add a link to the issue being addressed by this change.

#### Description

Expand All @@ -17,7 +17,7 @@ If your change affects the user interface you should include a screenshot of the
- [ ] My code passes our static analysis suite.
- [ ] My code passes our continuous integration process.

If your code does not pass all the requirements on the checklist you have to add a comment explaining why this change
If your code does not pass all the requirements on the checklist you have to add a comment explaining why this change
should be exempt from the list.

#### Additional comments or questions
Expand Down
29 changes: 29 additions & 0 deletions .github/workflows/changelog.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# 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
strategy:
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v4
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
69 changes: 69 additions & 0 deletions .github/workflows/composer.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# 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: root

on:
pull_request:
push:
branches:
- main
- develop

jobs:
composer-validate:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v4
- run: |
docker network create frontend
docker compose run --rm phpfpm composer validate --strict

composer-normalized:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v4
- run: |
docker network create frontend
docker compose run --rm phpfpm composer install
docker compose run --rm phpfpm composer normalize --dry-run

composer-audit:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v4
- run: |
docker network create frontend
docker compose run --rm phpfpm composer install
docker compose run --rm phpfpm composer audit
2 changes: 1 addition & 1 deletion .github/workflows/github_build_release.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
on:
push:
tags:
- '*.*.*'
- "*.*.*"

name: Create Github Release

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/itkdev_docker_build_develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
on:
push:
branches:
- 'develop'
- "develop"

# This Action builds to itkdev/* using ./infrastructure/itkdev/*
name: ITK Dev - Build docker image (develop)
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/itkdev_docker_build_tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
on:
push:
tags:
- '*'
- "*"

# This Action builds to itkdev/* using ./infrastructure/itkdev/*
name: ITK Dev - Build docker image (tag)
Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/javascript.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# 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:
push:
branches:
- main
- develop

jobs:
javascript-lint:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v4

- run: |
docker network create frontend

- run: |
docker compose run --rm prettier 'assets/**/*.js' --check
43 changes: 43 additions & 0 deletions .github/workflows/markdown.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# 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:
push:
branches:
- main
- develop

jobs:
markdown-lint:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v4

- run: |
docker network create frontend

- run: |
docker compose run --rm markdownlint markdownlint '**/*.md'
2 changes: 1 addition & 1 deletion .github/workflows/os2display_docker_build_develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
on:
push:
branches:
- 'develop'
- "develop"

# This Action builds to os2display/* using ./infrastructure/os2display/*
name: OS2display - Build docker image (develop)
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/os2display_docker_build_tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
on:
push:
tags:
- '*'
- "*"

# This Action builds to os2display/* using ./infrastructure/os2display/*
name: OS2display - Build docker image (tag)
Expand Down
56 changes: 56 additions & 0 deletions .github/workflows/php.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Do not edit this file! Make a pull request on changing
# github/workflows/symfony/php.yaml in
# https://github.com/itk-dev/devops_itkdev-docker if need be.

### ### 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`.

name: Symfony 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
# 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
Loading