Skip to content

Commit 8cc8742

Browse files
authored
Implement CI/CD pipeline with GitHub Actions and enhance project structure (#113)
* Implement CI/CD pipeline and enhance project structure * Update CI configuration and add versioning documentation * Refactor CI tasks: remove unused functions and add JS testing support * Refactor classes to use readonly properties and update PHP version in Rector configuration
1 parent 0bb61e4 commit 8cc8742

28 files changed

+1567
-650
lines changed

deptrac.yaml renamed to .ci-tools/deptrac.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
parameters:
22
paths:
3-
- './src'
3+
- './../src'
44
layers:
55
- name: 'CoseLib'
66
collectors:

ecs.php renamed to .ci-tools/ecs.php

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,14 @@
1919
use PhpCsFixer\Fixer\PhpTag\LinebreakAfterOpeningTagFixer;
2020
use PhpCsFixer\Fixer\PhpUnit\PhpUnitTestAnnotationFixer;
2121
use PhpCsFixer\Fixer\PhpUnit\PhpUnitTestCaseStaticMethodCallsFixer;
22+
use PhpCsFixer\Fixer\PhpUnit\PhpUnitTestClassRequiresCoversFixer;
2223
use PhpCsFixer\Fixer\ReturnNotation\SimplifiedNullReturnFixer;
2324
use PhpCsFixer\Fixer\Strict\DeclareStrictTypesFixer;
2425
use PhpCsFixer\Fixer\Strict\StrictComparisonFixer;
2526
use PhpCsFixer\Fixer\Strict\StrictParamFixer;
2627
use PhpCsFixer\Fixer\Whitespace\ArrayIndentationFixer;
2728
use PhpCsFixer\Fixer\Whitespace\MethodChainingIndentationFixer;
29+
use Symplify\CodingStandard\Fixer\Spacing\MethodChainingNewlineFixer;
2830
use Symplify\EasyCodingStandard\Config\ECSConfig;
2931
use Symplify\EasyCodingStandard\ValueObject\Set\SetList;
3032

@@ -82,15 +84,19 @@
8284
'import_constants' => true,
8385
'import_functions' => true,
8486
]);
87+
8588
$config->skip([
86-
MethodChainingIndentationFixer::class => [
87-
__DIR__ . '*/DependencyInjection/Configuration.php',
88-
],
89+
PhpUnitTestClassRequiresCoversFixer::class,
90+
MethodChainingIndentationFixer::class => [__DIR__ . '/src/Resources/config'],
91+
MethodChainingNewlineFixer::class => [__DIR__ . '/src/Resources/config'],
8992
]);
9093

9194
$config->parallel();
9295
$config->paths([
93-
__DIR__ . '/src',
94-
__DIR__ . '/tests',
96+
__DIR__ . '/../src',
97+
__DIR__ . '/../tests',
98+
__DIR__ . '/../castor.php',
99+
__DIR__ . '/ecs.php',
100+
__DIR__ . '/rector.php',
95101
]);
96102
};

.ci-tools/infection.json.dist

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"source": {
3+
"directories": [
4+
"src"
5+
]
6+
},
7+
"timeout": 3,
8+
"logs": {
9+
"text": "infection.txt"
10+
},
11+
"mutators": {
12+
"@default": true,
13+
"global-ignoreSourceCodeByRegex": [
14+
"\\$this->logger.*",
15+
"\\$this->cache->save.*",
16+
"parent::build(\\$container);"
17+
],
18+
"MBString": {
19+
"settings": {
20+
"mb_substr": false,
21+
"mb_strlen": false
22+
}
23+
}
24+
}
25+
}

.ci-tools/phpbench.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"runner.bootstrap": "../vendor/bootstrap.php",
3+
"runner.path": "../performance",
4+
"runner.progress": "dots",
5+
"runner.time_unit": "microseconds",
6+
"runner.retry_threshold": 10,
7+
"report.generators": {
8+
"full": {
9+
"extends": "aggregate",
10+
"cols": ["benchmark", "subject", "set", "revs", "its", "mem_peak", "best", "mode", "mean", "worst", "stdev", "rstdev"]
11+
},
12+
"simple": {
13+
"extends": "aggregate",
14+
"cols": ["benchmark", "subject", "set", "best", "mean", "worst"]
15+
}
16+
},
17+
"report.outputs": {
18+
"all": {
19+
"renderer": "html",
20+
"file": "report.html",
21+
"title": "Jose Performance Test Suite"
22+
}
23+
}
24+
}

0 commit comments

Comments
 (0)