Skip to content

Commit 9fcd5d0

Browse files
committed
Add (or update) GitHub Action (GHA) files and related config.
1 parent b11e263 commit 9fcd5d0

16 files changed

+400
-149
lines changed
File renamed without changes.
File renamed without changes.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<!-- <arg name="parallel" value="75"/>-->
1616

1717
<file>.</file>
18-
<exclude-pattern>*/vendor/*|*/build/*</exclude-pattern>
18+
<exclude-pattern>*/vendor/*|*/.config/*</exclude-pattern>
1919

2020
<rule ref="PHPCompatibility"/>
2121
<config name="testVersion" value="8.0-"/>

.github/workflows/dependancy-security-check.yml

Lines changed: 0 additions & 50 deletions
This file was deleted.

.github/workflows/dockerfile.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
name: Dockerfile Quality Assistance
3+
4+
on:
5+
# This event occurs when there is activity on a pull request. The workflow
6+
# will be run against the commits, after merge to the target branch (main).
7+
pull_request:
8+
branches: [ main ]
9+
paths:
10+
- 'Dockerfile'
11+
types: [ opened, reopened, synchronize ]
12+
# This event occurs when there is a push to the repository.
13+
push:
14+
paths:
15+
- 'Dockerfile'
16+
# Allow manually triggering the workflow.
17+
workflow_dispatch:
18+
19+
concurrency:
20+
group: ${{ github.workflow }}-${{ github.ref }}
21+
cancel-in-progress: true
22+
23+
permissions:
24+
# Needed to allow the "concurrency" section to cancel a workflow run.
25+
actions: write
26+
27+
jobs:
28+
# 03.quality.docker.lint.yml
29+
lint-dockerfile:
30+
name: Dockerfile Linting
31+
runs-on: ubuntu-24.04
32+
steps:
33+
- uses: actions/checkout@v4
34+
- uses: docker://pipelinecomponents/hadolint
35+
with:
36+
args: >-
37+
hadolint

.github/workflows/json.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
name: JSON Quality Assistance
3+
4+
on:
5+
# This event occurs when there is activity on a pull request. The workflow
6+
# will be run against the commits, after merge to the target branch (main).
7+
pull_request:
8+
branches: [ main ]
9+
paths:
10+
- '**.json'
11+
types: [ opened, reopened, synchronize ]
12+
# This event occurs when there is a push to the repository.
13+
push:
14+
paths:
15+
- '**.json'
16+
# Allow manually triggering the workflow.
17+
workflow_dispatch:
18+
19+
concurrency:
20+
group: ${{ github.workflow }}-${{ github.ref }}
21+
cancel-in-progress: true
22+
23+
permissions:
24+
# Needed to allow the "concurrency" section to cancel a workflow run.
25+
actions: write
26+
27+
jobs:
28+
# 01.preflight.json.lint-syntax.yml
29+
lint-json-syntax:
30+
name: JSON Syntax Linting
31+
runs-on: ubuntu-24.04
32+
steps:
33+
- uses: actions/checkout@v4
34+
- uses: docker://pipelinecomponents/jsonlint
35+
with:
36+
args: >-
37+
find .
38+
-not -path './.git/*'
39+
-not -path './node_modules/*'
40+
-not -path './vendor/*'
41+
-name '*.json'
42+
-type f
43+
-exec jsonlint --quiet {} ;

.github/workflows/linting.yml

Lines changed: 0 additions & 37 deletions
This file was deleted.

.github/workflows/markdown.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
---
2+
name: Markdown Quality Assistance
3+
4+
on:
5+
# This event occurs when there is activity on a pull request. The workflow
6+
# will be run against the commits, after merge to the target branch (main).
7+
pull_request:
8+
branches: [ main ]
9+
paths:
10+
- '**.md'
11+
types: [ opened, reopened, synchronize ]
12+
# This event occurs when there is a push to the repository.
13+
push:
14+
paths:
15+
- '**.md'
16+
# Allow manually triggering the workflow.
17+
workflow_dispatch:
18+
19+
concurrency:
20+
group: ${{ github.workflow }}-${{ github.ref }}
21+
cancel-in-progress: true
22+
23+
permissions:
24+
# Needed to allow the "concurrency" section to cancel a workflow run.
25+
actions: write
26+
27+
jobs:
28+
# 01.quality.markdown.lint-syntax.yml
29+
lint-markdown-syntax:
30+
name: Markdown Linting
31+
runs-on: ubuntu-24.04
32+
steps:
33+
- uses: actions/checkout@v4
34+
- uses: docker://pipelinecomponents/remark-lint
35+
with:
36+
args: >-
37+
remark
38+
--rc-path=.config/.remarkrc
39+
--ignore-pattern='*/vendor/*'
40+
# 03.quality.markdown.lint-spelling.yml
41+
spellcheck-markdown:
42+
name: Markdown Spellcheck
43+
runs-on: ubuntu-24.04
44+
steps:
45+
- uses: actions/checkout@v4
46+
- uses: docker://pipelinecomponents/markdown-spellcheck
47+
with:
48+
args: >-
49+
mdspell
50+
--en-us
51+
--ignore-numbers
52+
--report
53+
'**/*.md'
54+
'!**/node_modules/**/*.md'
55+
'!**/vendor/**/*.md'

.github/workflows/php-version-sniff.yml

Lines changed: 0 additions & 31 deletions
This file was deleted.

.github/workflows/php.yml

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
---
2+
name: PHP Quality Assistance
3+
4+
on:
5+
# This event occurs when there is activity on a pull request. The workflow
6+
# will be run against the commits, after merge to the target branch (main).
7+
pull_request:
8+
paths:
9+
- '**.php'
10+
- '.config/phpcs.xml.dist'
11+
- '.config/phpunit.xml.dist'
12+
- 'composer.json'
13+
- 'composer.lock'
14+
branches: [ main ]
15+
types: [ opened, reopened, synchronize ]
16+
# This event occurs when there is a push to the repository.
17+
push:
18+
paths:
19+
- '**.php'
20+
- '.config/phpcs.xml.dist'
21+
- '.config/phpunit.xml.dist'
22+
- 'composer.json'
23+
- 'composer.lock'
24+
# Allow manually triggering the workflow.
25+
workflow_dispatch:
26+
# Run once the "JSON Quality Assistance" workflow has been completed.
27+
workflow_run:
28+
workflows: [ "JSON Quality Assistance" ]
29+
types:
30+
- completed
31+
32+
concurrency:
33+
group: ${{ github.workflow }}-${{ github.ref }}
34+
cancel-in-progress: true
35+
36+
permissions:
37+
# Needed to allow the "concurrency" section to cancel a workflow run.
38+
actions: write
39+
40+
jobs:
41+
# 01.preflight.php.lint-syntax.yml
42+
lint-php-syntax:
43+
name: PHP Syntax Linting
44+
runs-on: ubuntu-24.04
45+
steps:
46+
- uses: actions/checkout@v4
47+
- uses: docker://pipelinecomponents/php-linter
48+
with:
49+
args: >-
50+
parallel-lint
51+
--exclude .git
52+
--exclude vendor
53+
--no-progress
54+
.
55+
# 01.quality.php.validate.dependencies-file.yml
56+
validate-dependencies-file:
57+
name: Validate dependencies file
58+
runs-on: ubuntu-24.04
59+
steps:
60+
- uses: actions/checkout@v4
61+
- run: >-
62+
composer validate
63+
--check-lock
64+
--no-plugins
65+
--no-scripts
66+
--strict
67+
# 03.quality.php.scan.dependencies-vulnerabilities.yml
68+
scan-dependencies-vulnerabilities:
69+
name: Scan Dependencies Vulnerabilities
70+
needs:
71+
- validate-dependencies-file
72+
runs-on: ubuntu-24.04
73+
steps:
74+
- uses: actions/checkout@v4
75+
- run: >-
76+
composer audit
77+
--abandoned=report
78+
--locked
79+
--no-dev
80+
--no-plugins
81+
--no-scripts
82+
# 03.quality.php.lint-quality.yml
83+
php-lint-quality:
84+
runs-on: ubuntu-24.04
85+
steps:
86+
- uses: actions/checkout@v4
87+
- uses: pipeline-components/php-codesniffer@master
88+
with:
89+
options: --standard=.config/phpcs.xml.dist
90+
# 03.quality.php.lint-version-compatibility.yml
91+
php-check-version-compatibility:
92+
continue-on-error: ${{ matrix.php < '8.1' || matrix.php > '8.4' }}
93+
name: PHP Version Compatibility
94+
needs:
95+
- lint-php-syntax
96+
runs-on: ubuntu-24.04
97+
strategy:
98+
fail-fast: false
99+
matrix:
100+
php:
101+
- 8.0 # from 2020-11 to 2022-11 (2023-11)
102+
- 8.1 # from 2021-11 to 2023-11 (2025-12)
103+
- 8.2 # from 2022-12 to 2024-12 (2026-12)
104+
- 8.3 # from 2023-11 to 2025-12 (2027-12)
105+
- 8.4 # from 2024-11 to 2026-12 (2028-12)
106+
- 8.5 # from 2025-11 to 2027-12 (2029-12)
107+
steps:
108+
- uses: actions/checkout@v4
109+
- uses: docker://pipelinecomponents/php-codesniffer
110+
with:
111+
options: >-
112+
phpcs
113+
-s
114+
--extensions=php
115+
--ignore='*vendor/*'
116+
--runtime-set testVersion ${{ matrix.php }}
117+
--standard=PHPCompatibility
118+
.

0 commit comments

Comments
 (0)