Skip to content

Commit e3f0e49

Browse files
committed
Add basic linting and testing scripts to the Composer configuration
Signed-off-by: Tim Goudriaan <tim@codedmonkey.com>
1 parent d8fb47a commit e3f0e49

File tree

1 file changed

+52
-1
lines changed

1 file changed

+52
-1
lines changed

composer.json

Lines changed: 52 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,58 @@
107107
],
108108
"post-update-cmd": [
109109
"@auto-scripts"
110-
]
110+
],
111+
"build:standalone": "docker build . -t dirigent-standalone",
112+
"lint": [
113+
"@lint:coding-style",
114+
"@lint:static-analysis",
115+
"@lint:composer",
116+
"@lint:yaml",
117+
"@lint:container",
118+
"@lint:templates",
119+
"@lint:translations"
120+
],
121+
"lint:coding-style": "vendor/bin/php-cs-fixer fix --diff",
122+
"lint:composer": "composer validate",
123+
"lint:container": "bin/console lint:container",
124+
"lint:static-analysis": "vendor/bin/phpstan analyze",
125+
"lint:templates": "bin/console lint:twig templates",
126+
"lint:translations": "bin/console lint:translations",
127+
"lint:yaml": "bin/console lint:yaml .github config translations --parse-tags",
128+
"tests": [
129+
"@tests:php",
130+
"@tests:docker"
131+
],
132+
"tests:docker": [
133+
"@tests:docker:standalone"
134+
],
135+
"tests:docker:standalone": [
136+
"@build:standalone",
137+
"bin/phpunit --configuration phpunit.docker.xml tests/Docker/Standalone"
138+
],
139+
"tests:php": [
140+
"@tests:php:unit",
141+
"@tests:php:functional"
142+
],
143+
"tests:php:functional": "bin/phpunit tests/FunctionalTests",
144+
"tests:php:unit": "bin/phpunit tests/UnitTests"
145+
},
146+
"scripts-descriptions": {
147+
"build:standalone": "Build the standalone image",
148+
"lint": "Perform all linting validations",
149+
"lint:coding-style": "Validate the code style of the PHP code",
150+
"lint:composer": "Validate the Composer configuration",
151+
"lint:container": "Validate the Symfony container configuration",
152+
"lint:static-analysis": "Run static analysis on the PHP code",
153+
"lint:templates": "Validate the Twig templates",
154+
"lint:translations": "Validate the translations",
155+
"lint:yaml": "Validate YAML files",
156+
"tests": "Perform all code tests",
157+
"tests:docker": "Run all tests for images",
158+
"tests:docker:standalone": "Run tests in the standalone image",
159+
"tests:php": "Run all PHP tests",
160+
"tests:php:functional": "Run the functional test suite",
161+
"tests:php:unit": "Run the unit test suite"
111162
},
112163
"config": {
113164
"allow-plugins": {

0 commit comments

Comments
 (0)