Skip to content

Commit bcf447f

Browse files
committed
Add (or update) GitHub Action (GHA) files and related config.
1 parent e8d265c commit bcf447f

File tree

9 files changed

+365
-2
lines changed

9 files changed

+365
-2
lines changed

.config/.remarkrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"plugins": [
3+
"remark-preset-lint-recommended",
4+
["remark-lint-list-item-indent", "space"]
5+
]
6+
}

.config/.yamllint

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
extends: default
3+
4+
ignore: |
5+
vendor/
6+
7+
rules:
8+
brackets:
9+
max-spaces-inside: 1
10+
document-start: disable
11+
line-length:
12+
level: warning
13+
max: 120
14+
truthy: {allowed-values: ["true", "false", "on"]}

.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/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.yml

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
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+
33+
concurrency:
34+
group: ${{ github.workflow }}-${{ github.ref }}
35+
cancel-in-progress: true
36+
37+
permissions:
38+
# Needed to allow the "concurrency" section to cancel a workflow run.
39+
actions: write
40+
41+
jobs:
42+
# 01.preflight.php.lint-syntax.yml
43+
lint-php-syntax:
44+
name: PHP Syntax Linting
45+
runs-on: ubuntu-24.04
46+
steps:
47+
- uses: actions/checkout@v4
48+
- uses: docker://pipelinecomponents/php-linter
49+
with:
50+
args: >-
51+
parallel-lint
52+
--exclude .git
53+
--exclude vendor
54+
--no-progress
55+
.
56+
# 01.quality.php.validate.dependencies-file.yml
57+
validate-dependencies-file:
58+
name: Validate dependencies file
59+
runs-on: ubuntu-24.04
60+
steps:
61+
- uses: actions/checkout@v4
62+
- run: >-
63+
composer validate
64+
--check-lock
65+
--no-plugins
66+
--no-scripts
67+
--strict
68+
# 03.quality.php.scan.dependencies-vulnerabilities.yml
69+
scan-dependencies-vulnerabilities:
70+
name: Scan Dependencies Vulnerabilities
71+
needs:
72+
- validate-dependencies-file
73+
runs-on: ubuntu-24.04
74+
steps:
75+
- uses: actions/checkout@v4
76+
- run: >-
77+
composer audit
78+
--abandoned=report
79+
--locked
80+
--no-dev
81+
--no-plugins
82+
--no-scripts
83+
# 03.quality.php.lint-version-compatibility.yml
84+
php-check-version-compatibility:
85+
continue-on-error: ${{ matrix.php < '8.1' || matrix.php > '8.4' }}
86+
name: PHP Version Compatibility
87+
needs:
88+
- lint-php-syntax
89+
runs-on: ubuntu-24.04
90+
strategy:
91+
fail-fast: false
92+
matrix:
93+
php:
94+
- 8.0 # from 2020-11 to 2022-11 (2023-11)
95+
- 8.1 # from 2021-11 to 2023-11 (2025-12)
96+
- 8.2 # from 2022-12 to 2024-12 (2026-12)
97+
- 8.3 # from 2023-11 to 2025-12 (2027-12)
98+
- 8.4 # from 2024-11 to 2026-12 (2028-12)
99+
- 8.5 # from 2025-11 to 2027-12 (2029-12)
100+
steps:
101+
- uses: actions/checkout@v4
102+
- uses: docker://pipelinecomponents/php-codesniffer
103+
with:
104+
options: >-
105+
phpcs
106+
-s
107+
--extensions=php
108+
--ignore='*vendor/*'
109+
--runtime-set testVersion ${{ matrix.php }}
110+
--standard=PHPCompatibility
111+
.

.github/workflows/shell.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
---
2+
name: Shell Script Quality Assistance
3+
4+
5+
on:
6+
# This event occurs when there is activity on a pull request. The workflow
7+
# will be run against the commits, after merge to the target branch (main).
8+
pull_request:
9+
branches: [ main ]
10+
paths:
11+
- '**.bash'
12+
- '**.sh'
13+
types: [ opened, reopened, synchronize ]
14+
# This event occurs when there is a push to the repository.
15+
push:
16+
paths:
17+
- '**.bash'
18+
- '**.sh'
19+
# Allow manually triggering the workflow.
20+
workflow_dispatch:
21+
22+
concurrency:
23+
group: ${{ github.workflow }}-${{ github.ref }}
24+
cancel-in-progress: true
25+
26+
permissions:
27+
# Needed to allow the "concurrency" section to cancel a workflow run.
28+
actions: write
29+
30+
jobs:
31+
# 01.preflight.shell.lint-syntax.yml
32+
lint-shell-syntax:
33+
name: Shell Syntax Linting
34+
runs-on: ubuntu-24.04
35+
steps:
36+
- uses: actions/checkout@v4
37+
- run: >-
38+
find .
39+
-name '*.sh'
40+
-print0
41+
| xargs -0 -P"$(nproc)" -I{} bash -n "{}"
42+
# 03.quality.shell.lint.yml
43+
lint-shell-quality:
44+
name: Shell Quality Linting
45+
runs-on: ubuntu-24.04
46+
steps:
47+
- uses: actions/checkout@v4
48+
- uses: docker://pipelinecomponents/shellcheck
49+
with:
50+
args: >-
51+
find .
52+
\( -name '*.sh' -o -name '*.bash' \)
53+
-type f
54+
-not -name .git
55+
-print0
56+
| xargs -0 -r -n1 shellcheck

.github/workflows/ci.yml renamed to .github/workflows/solid-test-suites.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
22
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
33

4-
name: CI
4+
name: Solid Test Suites
55

66
on:
77
push:
@@ -19,6 +19,6 @@ jobs:
1919
os: [ubuntu-latest]
2020

2121
steps:
22-
- uses: actions/checkout@v2
22+
- uses: actions/checkout@v4
2323
# Run the Solid test-suite
2424
- run: bash ./run-solid-test-suite.sh

.github/workflows/yaml.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
name: YAML 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+
- '**.yml'
11+
- '**.yaml'
12+
types: [ opened, reopened, synchronize ]
13+
# This event occurs when there is a push to the repository.
14+
push:
15+
paths:
16+
- '**.yml'
17+
- '**.yaml'
18+
# Allow manually triggering the workflow.
19+
workflow_dispatch:
20+
21+
concurrency:
22+
group: ${{ github.workflow }}-${{ github.ref }}
23+
cancel-in-progress: true
24+
25+
permissions:
26+
# Needed to allow the "concurrency" section to cancel a workflow run.
27+
actions: write
28+
29+
jobs:
30+
# 01.preflight.yaml.lint.yml
31+
lint-yaml:
32+
name: YAML Linting
33+
runs-on: ubuntu-24.04
34+
steps:
35+
- uses: actions/checkout@v4
36+
- uses: docker://pipelinecomponents/yamllint
37+
with:
38+
args: >-
39+
yamllint
40+
--config-file=.config/.yamllint
41+
.

0 commit comments

Comments
 (0)