Skip to content

Commit 9e60580

Browse files
authored
Merge pull request #28 from itk-dev/release/4.1.0
Release 4.1.0
2 parents be2dff9 + 2a52e77 commit 9e60580

45 files changed

Lines changed: 1670 additions & 445 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.docker/data/.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Ignore everything in this directory
2+
*
3+
# Except
4+
!.gitignore
5+
!README.md

.docker/data/README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# .docker/data
2+
3+
Please map persistent volumes to this directory on the servers.
4+
5+
If a container needs to persist data between restarts you can map the relevant files in the container to ``docker/data/<container-name>`.
6+
7+
## RabbitMQ example
8+
If you are using RabbitMQ running in a container as a message broker you need to configure a persistent volume for RabbitMQs data directory to avoid losing message on container restarts.
9+
10+
```yaml
11+
# docker-compose.server.override.yml
12+
13+
services:
14+
rabbit:
15+
image: rabbitmq:3.9-management-alpine
16+
hostname: "${COMPOSE_PROJECT_NAME}"
17+
networks:
18+
- app
19+
- frontend
20+
environment:
21+
- "RABBITMQ_DEFAULT_USER=${RABBITMQ_USER}"
22+
- "RABBITMQ_DEFAULT_PASS=${RABBITMQ_PASSWORD}"
23+
- "RABBITMQ_ERLANG_COOKIE=${RABBITMQ_ERLANG_COOKIE}"
24+
volumes:
25+
- ".docker/data/rabbitmq:/var/lib/rabbitmq/mnesia/"
26+
```

.github/workflows/changelog.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Do not edit this file! Make a pull request on changing
2+
# github/workflows/changelog.yaml in
3+
# https://github.com/itk-dev/devops_itkdev-docker if need be.
4+
5+
### ### Changelog
6+
###
7+
### Checks that changelog has been updated
8+
9+
name: Changelog
10+
11+
on:
12+
pull_request:
13+
14+
jobs:
15+
changelog:
16+
runs-on: ubuntu-latest
17+
strategy:
18+
fail-fast: false
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v5
22+
with:
23+
fetch-depth: 2
24+
25+
- name: Git fetch
26+
run: git fetch
27+
28+
- name: Check that changelog has been updated.
29+
run: git diff --exit-code origin/${{ github.base_ref }} -- CHANGELOG.md && exit 1 || exit 0

.github/workflows/composer.yaml

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
# Do not edit this file! Make a pull request on changing
2+
# github/workflows/composer.yaml in
3+
# https://github.com/itk-dev/devops_itkdev-docker if need be.
4+
5+
### ### Composer
6+
###
7+
### Validates composer.json and checks that it's normalized.
8+
###
9+
### #### Assumptions
10+
###
11+
### 1. A docker compose service named `phpfpm` can be run and `composer` can be
12+
### run inside the `phpfpm` service.
13+
### 2. [ergebnis/composer-normalize](https://github.com/ergebnis/composer-normalize)
14+
### is a dev requirement in `composer.json`:
15+
###
16+
### ``` shell
17+
### docker compose run --rm phpfpm composer require --dev ergebnis/composer-normalize
18+
### ```
19+
###
20+
### Normalize `composer.json` by running
21+
###
22+
### ``` shell
23+
### docker compose run --rm phpfpm composer normalize
24+
### ```
25+
26+
name: Composer
27+
28+
env:
29+
COMPOSE_USER: runner
30+
31+
on:
32+
pull_request:
33+
push:
34+
branches:
35+
- main
36+
- develop
37+
38+
jobs:
39+
composer-validate:
40+
name: Validate composer (${{ matrix.prefer }})
41+
runs-on: ubuntu-latest
42+
strategy:
43+
fail-fast: false
44+
matrix:
45+
prefer: [prefer-lowest, prefer-stable]
46+
steps:
47+
- uses: actions/checkout@v5
48+
49+
- name: Create docker network
50+
run: |
51+
docker network create frontend
52+
53+
- run: |
54+
docker compose run --rm phpfpm composer validate --strict
55+
56+
composer-normalized:
57+
runs-on: ubuntu-latest
58+
strategy:
59+
fail-fast: false
60+
steps:
61+
- uses: actions/checkout@v5
62+
63+
- name: Create docker network
64+
run: |
65+
docker network create frontend
66+
67+
- run: |
68+
docker compose run --rm phpfpm composer install
69+
docker compose run --rm phpfpm composer normalize --dry-run
70+
71+
composer-audit:
72+
runs-on: ubuntu-latest
73+
strategy:
74+
fail-fast: false
75+
steps:
76+
- uses: actions/checkout@v5
77+
78+
- name: Create docker network
79+
run: |
80+
docker network create frontend
81+
82+
- run: |
83+
docker compose run --rm phpfpm composer audit

.github/workflows/github_build_release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
on:
22
push:
33
tags:
4-
- '*.*.*'
4+
- "*.*.*"
55

66
name: Create Github Release
77

@@ -16,7 +16,7 @@ jobs:
1616
APP_ENV: prod
1717
steps:
1818
- name: Checkout
19-
uses: actions/checkout@v4
19+
uses: actions/checkout@v5
2020

2121
- name: Create a release in GitHub
2222
run: gh release create ${{ github.ref_name }} --verify-tag --generate-notes

.github/workflows/markdown.yaml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Do not edit this file! Make a pull request on changing
2+
# github/workflows/markdown.yaml in
3+
# https://github.com/itk-dev/devops_itkdev-docker if need be.
4+
5+
### ### Markdown
6+
###
7+
### Lints Markdown files (`**/*.md`) in the project.
8+
###
9+
### [markdownlint-cli configuration
10+
### files](https://github.com/igorshubovych/markdownlint-cli?tab=readme-ov-file#configuration),
11+
### `.markdownlint.jsonc` and `.markdownlintignore`, control what is actually
12+
### linted and how.
13+
###
14+
### #### Assumptions
15+
###
16+
### 1. A docker compose service named `markdownlint` for running `markdownlint`
17+
### (from
18+
### [markdownlint-cli](https://github.com/igorshubovych/markdownlint-cli))
19+
### exists.
20+
21+
name: Markdown
22+
23+
on:
24+
pull_request:
25+
push:
26+
branches:
27+
- main
28+
- develop
29+
30+
jobs:
31+
markdown-lint:
32+
runs-on: ubuntu-latest
33+
strategy:
34+
fail-fast: false
35+
steps:
36+
- name: Checkout
37+
uses: actions/checkout@v5
38+
39+
- name: Create docker network
40+
run: |
41+
docker network create frontend
42+
43+
- run: |
44+
docker compose run --rm markdownlint markdownlint '**/*.md'

.github/workflows/php.yaml

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
name: PHP
2+
3+
env:
4+
COMPOSE_USER: runner
5+
6+
on:
7+
pull_request:
8+
push:
9+
branches:
10+
- main
11+
- develop
12+
13+
jobs:
14+
coding-standards:
15+
name: PHP - Check Coding Standards
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v5
19+
20+
- name: Create docker network
21+
run: |
22+
docker network create frontend
23+
24+
- run: |
25+
docker compose run --rm phpfpm composer install
26+
docker compose run --rm phpfpm vendor/bin/php-cs-fixer fix --dry-run --diff
27+
28+
phpstan:
29+
name: PHPStan
30+
runs-on: ubuntu-latest
31+
steps:
32+
- uses: actions/checkout@v5
33+
34+
- name: Create docker network
35+
run: |
36+
docker network create frontend
37+
38+
- run: |
39+
docker compose run --rm phpfpm composer install
40+
docker compose run --rm phpfpm vendor/bin/phpstan
41+
42+
unit-tests:
43+
name: Unit tests (${{ matrix.php }}, ${{ matrix.prefer }})
44+
runs-on: ubuntu-latest
45+
strategy:
46+
fail-fast: false
47+
matrix:
48+
include:
49+
- service: phpfpm
50+
php: "8.3"
51+
prefer: prefer-lowest
52+
- service: phpfpm
53+
php: "8.3"
54+
prefer: prefer-stable
55+
- service: phpfpm84
56+
php: "8.4"
57+
prefer: prefer-lowest
58+
- service: phpfpm84
59+
php: "8.4"
60+
prefer: prefer-stable
61+
- service: phpfpm85
62+
php: "8.5"
63+
prefer: prefer-lowest
64+
- service: phpfpm85
65+
php: "8.5"
66+
prefer: prefer-stable
67+
steps:
68+
- uses: actions/checkout@v5
69+
70+
- name: Create docker network
71+
run: |
72+
docker network create frontend
73+
74+
- run: |
75+
docker compose run --rm -e XDEBUG_MODE=coverage ${{ matrix.service }} composer update --${{ matrix.prefer }}
76+
docker compose run --rm -e XDEBUG_MODE=coverage ${{ matrix.service }} vendor/bin/phpunit --coverage-clover=coverage/unit.xml
77+
78+
- name: Upload coverage to Codecov
79+
if: matrix.service == 'phpfpm' && matrix.prefer == 'prefer-stable'
80+
uses: codecov/codecov-action@v5
81+
with:
82+
token: ${{ secrets.CODECOV_TOKEN }}
83+
files: ./coverage/unit.xml
84+
fail_ci_if_error: true
85+
flags: unittests

0 commit comments

Comments
 (0)