Skip to content

Commit fa612d3

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

File tree

10 files changed

+406
-2
lines changed

10 files changed

+406
-2
lines changed

.config/.remarkrc

+6
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

+14
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"]}

.config/hadolint.yml

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
# For all available rules see: https://github.com/hadolint/hadolint#rules
3+
ignored:
4+
- DL3008 # We do not want to pin versions in apt get install.
5+
- DL3018 # We do not want to pin versions in apk add
6+
7+
# For full details see https://github.com/hadolint/hadolint#configure
8+
#
9+
# The following keys are available:
10+
#
11+
# failure-threshold: string # name of threshold level (error | warning | info | style | ignore | none)
12+
# format: string # Output format (tty | json | checkstyle | codeclimate | gitlab_codeclimate | gnu | codacy)
13+
# label-schema: # See https://github.com/hadolint/hadolint#linting-labels for details
14+
# author: string # Your name
15+
# contact: string # email address
16+
# created: timestamp # rfc3339 datetime
17+
# version: string # semver
18+
# documentation: string # url
19+
# git-revision: string # hash
20+
# license: string # spdx
21+
# no-color: boolean # true | false
22+
# no-fail: boolean # true | false
23+
# override:
24+
# error: [string] # list of rules
25+
# warning: [string] # list of rules
26+
# info: [string] # list of rules
27+
# style: [string] # list of rules
28+
# strict-labels: boolean # true | false
29+
# disable-ignore-pragma: boolean # true | false
30+
# trustedRegistries: string | [string] # registry or list of registries

.github/workflows/dockerfile.yml

+58
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
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+
- '.config/hadolint.yml'
11+
- '.dockerignore'
12+
- '.github/workflows/dockerfile.yml'
13+
- 'Dockerfile'
14+
# Docker project specific, Dockerfile "COPY" and "ADD" entries.
15+
- 'src/'
16+
- 'web/'
17+
- 'composer.json'
18+
- 'composer.lock'
19+
- 'site.conf'
20+
types: [ opened, reopened, synchronize ]
21+
# This event occurs when there is a push to the repository.
22+
push:
23+
paths:
24+
- '.config/hadolint.yml'
25+
- '.dockerignore'
26+
- '.github/workflows/dockerfile.yml'
27+
- 'Dockerfile'
28+
# Docker project specific, Dockerfile "COPY" and "ADD" entries.
29+
- 'src/'
30+
- 'web/'
31+
- 'composer.json'
32+
- 'composer.lock'
33+
- 'site.conf'
34+
# Allow manually triggering the workflow.
35+
workflow_dispatch:
36+
37+
# Cancels all previous workflow runs for the same branch that have not yet completed.
38+
concurrency:
39+
group: ${{ github.workflow }}-${{ github.ref }}
40+
cancel-in-progress: true
41+
42+
permissions:
43+
# Needed to allow the "concurrency" section to cancel a workflow run.
44+
actions: write
45+
46+
jobs:
47+
# 03.quality.docker.lint.yml
48+
lint-dockerfile:
49+
name: Dockerfile Linting
50+
runs-on: ubuntu-24.04
51+
steps:
52+
- uses: actions/checkout@v4
53+
- uses: docker://pipelinecomponents/hadolint
54+
with:
55+
args: >-
56+
hadolint
57+
--config .config/hadolint.yml
58+
Dockerfile

.github/workflows/json.yml

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
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+
- '.github/workflows/json.yml'
12+
types: [ opened, reopened, synchronize ]
13+
# This event occurs when there is a push to the repository.
14+
push:
15+
paths:
16+
- '**.json'
17+
- '.github/workflows/json.yml'
18+
# Allow manually triggering the workflow.
19+
workflow_dispatch:
20+
21+
# Cancels all previous workflow runs for the same branch that have not yet completed.
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.json.lint-syntax.yml
32+
lint-json-syntax:
33+
name: JSON Syntax Linting
34+
runs-on: ubuntu-24.04
35+
steps:
36+
- uses: actions/checkout@v4
37+
- uses: docker://pipelinecomponents/jsonlint
38+
with:
39+
args: >-
40+
find .
41+
-not -path './.git/*'
42+
-not -path './node_modules/*'
43+
-not -path './vendor/*'
44+
-name '*.json'
45+
-type f
46+
-exec jsonlint --quiet {} ;

.github/workflows/markdown.yml

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
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+
- '.github/workflows/markdown.yml'
12+
types: [ opened, reopened, synchronize ]
13+
# This event occurs when there is a push to the repository.
14+
push:
15+
paths:
16+
- '**.md'
17+
- '.github/workflows/markdown.yml'
18+
# Allow manually triggering the workflow.
19+
workflow_dispatch:
20+
21+
# Cancels all previous workflow runs for the same branch that have not yet completed.
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.quality.markdown.lint-syntax.yml
32+
lint-markdown-syntax:
33+
name: Markdown Linting
34+
runs-on: ubuntu-24.04
35+
steps:
36+
- uses: actions/checkout@v4
37+
- uses: docker://pipelinecomponents/remark-lint
38+
with:
39+
args: >-
40+
remark
41+
--rc-path=.config/.remarkrc
42+
--ignore-pattern='*/vendor/*'

.github/workflows/php.yml

+106
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
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+
- '.github/workflows/php.yml'
13+
- 'composer.json'
14+
- 'composer.lock'
15+
branches: [ main ]
16+
types: [ opened, reopened, synchronize ]
17+
# This event occurs when there is a push to the repository.
18+
push:
19+
paths:
20+
- '**.php'
21+
- '.config/phpcs.xml.dist'
22+
- '.config/phpunit.xml.dist'
23+
- '.github/workflows/php.yml'
24+
- 'composer.json'
25+
- 'composer.lock'
26+
# Allow manually triggering the workflow.
27+
workflow_dispatch:
28+
29+
30+
# Cancels all previous workflow runs for the same branch that have not yet completed.
31+
concurrency:
32+
group: ${{ github.workflow }}-${{ github.ref }}
33+
cancel-in-progress: true
34+
35+
permissions:
36+
# Needed to allow the "concurrency" section to cancel a workflow run.
37+
actions: write
38+
39+
jobs:
40+
# 01.preflight.php.lint-syntax.yml
41+
lint-php-syntax:
42+
name: PHP Syntax Linting
43+
runs-on: ubuntu-24.04
44+
steps:
45+
- uses: actions/checkout@v4
46+
- uses: docker://pipelinecomponents/php-linter
47+
with:
48+
args: >-
49+
parallel-lint
50+
--exclude .git
51+
--exclude vendor
52+
--no-progress
53+
.
54+
# 01.quality.php.validate.dependencies-file.yml
55+
validate-dependencies-file:
56+
name: Validate dependencies file
57+
runs-on: ubuntu-24.04
58+
steps:
59+
- uses: actions/checkout@v4
60+
- run: >-
61+
composer validate
62+
--check-lock
63+
--no-plugins
64+
--no-scripts
65+
--strict
66+
# 03.quality.php.scan.dependencies-vulnerabilities.yml
67+
scan-dependencies-vulnerabilities:
68+
name: Scan Dependencies Vulnerabilities
69+
needs:
70+
- validate-dependencies-file
71+
runs-on: ubuntu-24.04
72+
steps:
73+
- uses: actions/checkout@v4
74+
- run: >-
75+
composer audit
76+
--abandoned=report
77+
--locked
78+
--no-dev
79+
--no-plugins
80+
--no-scripts
81+
# 03.quality.php.lint-version-compatibility.yml
82+
php-check-version-compatibility:
83+
name: PHP Version Compatibility
84+
needs:
85+
- lint-php-syntax
86+
runs-on: ubuntu-24.04
87+
strategy:
88+
fail-fast: false
89+
matrix:
90+
php:
91+
- '8.0' # from 2020-11 to 2022-11 (2023-11)
92+
- '8.1' # from 2021-11 to 2023-11 (2025-12)
93+
- '8.2' # from 2022-12 to 2024-12 (2026-12)
94+
- '8.3' # from 2023-11 to 2025-12 (2027-12)
95+
steps:
96+
- uses: actions/checkout@v4
97+
- uses: docker://pipelinecomponents/php-codesniffer
98+
with:
99+
args: >-
100+
phpcs
101+
-s
102+
--extensions=php
103+
--ignore='*vendor/*'
104+
--runtime-set testVersion ${{ matrix.php }}
105+
--standard=PHPCompatibility
106+
.

.github/workflows/shell.yml

+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
---
2+
name: Shell Script 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+
- '**.bash'
11+
- '**.sh'
12+
- '.github/workflows/shell.yml'
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+
- '.github/workflows/shell.yml'
20+
# Allow manually triggering the workflow.
21+
workflow_dispatch:
22+
23+
# Cancels all previous workflow runs for the same branch that have not yet completed.
24+
concurrency:
25+
group: ${{ github.workflow }}-${{ github.ref }}
26+
cancel-in-progress: true
27+
28+
permissions:
29+
# Needed to allow the "concurrency" section to cancel a workflow run.
30+
actions: write
31+
32+
jobs:
33+
# 01.preflight.shell.lint-syntax.yml
34+
lint-shell-syntax:
35+
name: Shell Syntax Linting
36+
runs-on: ubuntu-24.04
37+
steps:
38+
- uses: actions/checkout@v4
39+
- run: >-
40+
find .
41+
-name '*.sh'
42+
-not -name .git
43+
-print0
44+
-type f
45+
| xargs -0 -P"$(nproc)" -I{} bash -n "{}"
46+
# 03.quality.shell.lint.yml
47+
lint-shell-quality:
48+
name: Shell Quality Linting
49+
runs-on: ubuntu-24.04
50+
steps:
51+
- uses: actions/checkout@v4
52+
- uses: docker://pipelinecomponents/shellcheck
53+
with:
54+
args: >-
55+
find .
56+
-not -name .git
57+
-print0
58+
-name '*.sh'
59+
-type f
60+
| xargs -0 -r -n1 shellcheck

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

+2-2
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

0 commit comments

Comments
 (0)