Skip to content

Commit 7bb22f2

Browse files
committed
CI tools moved to special composer.json
1 parent d5cdeb9 commit 7bb22f2

File tree

13 files changed

+7049
-7700
lines changed

13 files changed

+7049
-7700
lines changed

.github/workflows/continuous-integration.yml

Lines changed: 62 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,23 @@ jobs:
3838
with:
3939
coverage: "pcov"
4040
php-version: "${{ matrix.php-version }}"
41+
extensions: intl, sodium
4142
ini-values: memory_limit=-1
4243

4344
- name: "Install dependencies"
4445
uses: "ramsey/[email protected]"
4546
with:
4647
dependency-versions: "${{ matrix.dependencies }}"
4748

49+
- name: "Install CI dependencies"
50+
uses: "ramsey/[email protected]"
51+
with:
52+
dependency-versions: "${{ matrix.dependencies }}"
53+
working-directory: "tools"
54+
custom-cache-suffix: "ci"
55+
4856
- name: "Tests"
49-
run: "vendor/bin/phpunit"
57+
run: "tools/vendor/bin/phpunit"
5058

5159
static-analysis-phpstan:
5260
name: "Static Analysis by PHPStan"
@@ -73,15 +81,23 @@ jobs:
7381
with:
7482
coverage: "none"
7583
php-version: "${{ matrix.php-version }}"
84+
extensions: intl, sodium
7685
ini-values: memory_limit=-1
7786

7887
- name: "Install dependencies"
7988
uses: "ramsey/[email protected]"
8089
with:
8190
dependency-versions: "${{ matrix.dependencies }}"
8291

92+
- name: "Install CI dependencies"
93+
uses: "ramsey/[email protected]"
94+
with:
95+
dependency-versions: "${{ matrix.dependencies }}"
96+
working-directory: "tools"
97+
custom-cache-suffix: "ci"
98+
8399
- name: "PHPStan"
84-
run: "vendor/bin/phpstan analyse --memory-limit=-1"
100+
run: "tools/vendor/bin/phpstan analyse --memory-limit=-1"
85101

86102
static-analysis-psalm:
87103
name: "Static Analysis by Psalm"
@@ -106,15 +122,23 @@ jobs:
106122
with:
107123
coverage: "none"
108124
php-version: "${{ matrix.php-version }}"
125+
extensions: intl, sodium
109126
ini-values: memory_limit=-1
110127

111128
- name: "Install dependencies"
112129
uses: "ramsey/[email protected]"
113130
with:
114131
dependency-versions: "${{ matrix.dependencies }}"
115132

133+
- name: "Install CI dependencies"
134+
uses: "ramsey/[email protected]"
135+
with:
136+
dependency-versions: "${{ matrix.dependencies }}"
137+
working-directory: "tools"
138+
custom-cache-suffix: "ci"
139+
116140
- name: "psalm"
117-
run: "vendor/bin/psalm --shepherd --stats"
141+
run: "tools/vendor/bin/psalm --shepherd --stats"
118142

119143
mutation-tests:
120144
name: "Mutation tests"
@@ -139,15 +163,23 @@ jobs:
139163
with:
140164
coverage: "xdebug"
141165
php-version: "${{ matrix.php-version }}"
166+
extensions: intl, sodium
142167
ini-values: memory_limit=-1, zend.assertions=1
143168

144169
- name: "Install dependencies"
145170
uses: "ramsey/[email protected]"
146171
with:
147172
dependency-versions: "${{ matrix.dependencies }}"
148173

174+
- name: "Install CI dependencies"
175+
uses: "ramsey/[email protected]"
176+
with:
177+
dependency-versions: "${{ matrix.dependencies }}"
178+
working-directory: "tools"
179+
custom-cache-suffix: "ci"
180+
149181
- name: "Infection"
150-
run: "vendor/bin/roave-infection-static-analysis-plugin --threads=$(nproc)"
182+
run: "tools/vendor/bin/roave-infection-static-analysis-plugin --threads=$(nproc)"
151183
env:
152184
INFECTION_BADGE_API_KEY: ${{ secrets.INFECTION_BADGE_API_KEY }}
153185
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }}
@@ -176,15 +208,23 @@ jobs:
176208
with:
177209
coverage: "none"
178210
php-version: "${{ matrix.php-version }}"
211+
extensions: intl, sodium
179212
ini-values: memory_limit=-1
180213

181214
- name: "Install dependencies"
182215
uses: "ramsey/[email protected]"
183216
with:
184217
dependency-versions: "${{ matrix.dependencies }}"
185218

219+
- name: "Install CI dependencies"
220+
uses: "ramsey/[email protected]"
221+
with:
222+
dependency-versions: "${{ matrix.dependencies }}"
223+
working-directory: "tools"
224+
custom-cache-suffix: "ci"
225+
186226
- name: "Test Compatibility"
187-
run: "vendor/bin/phpunit test/compat"
227+
run: "tools/vendor/bin/phpunit test/compat"
188228

189229
demo-scripts:
190230
name: "Check Demo Scripts"
@@ -209,6 +249,7 @@ jobs:
209249
with:
210250
coverage: "none"
211251
php-version: "${{ matrix.php-version }}"
252+
extensions: intl, sodium
212253
ini-values: memory_limit=-1
213254

214255
- name: "Install dependencies"
@@ -243,18 +284,23 @@ jobs:
243284
with:
244285
coverage: "none"
245286
php-version: "${{ matrix.php-version }}"
287+
extensions: intl, sodium
246288
ini-values: memory_limit=-1
247289

248290
- name: "Install dependencies"
249291
uses: "ramsey/[email protected]"
250292
with:
251293
dependency-versions: "${{ matrix.dependencies }}"
252294

253-
- name: "Install PhpBench"
254-
run: "composer require --with-all-dependencies --dev --prefer-stable --no-interaction --no-progress phpbench/phpbench:^1.1.1"
295+
- name: "Install CI dependencies"
296+
uses: "ramsey/[email protected]"
297+
with:
298+
dependency-versions: "${{ matrix.dependencies }}"
299+
working-directory: "tools"
300+
custom-cache-suffix: "ci"
255301

256302
- name: "PhpBench"
257-
run: "vendor/bin/phpbench run --progress=dots --iterations=1"
303+
run: "tools/vendor/bin/phpbench run --progress=dots --iterations=1"
258304

259305
coding-standards:
260306
name: "Check Coding Standards"
@@ -279,15 +325,18 @@ jobs:
279325
with:
280326
coverage: "none"
281327
php-version: "${{ matrix.php-version }}"
328+
extensions: intl, sodium
282329
ini-values: memory_limit=-1
283330

284331
- name: "Install dependencies"
285332
uses: "ramsey/[email protected]"
286333
with:
287334
dependency-versions: "${{ matrix.dependencies }}"
335+
working-directory: "tools"
336+
custom-cache-suffix: "ci"
288337

289338
- name: "Coding Standard"
290-
run: "vendor/bin/phpcs"
339+
run: "tools/vendor/bin/phpcs"
291340

292341
backward-compatibility:
293342
name: "Check Backward Compatibility"
@@ -315,13 +364,15 @@ jobs:
315364
with:
316365
coverage: "none"
317366
php-version: "${{ matrix.php-version }}"
367+
extensions: intl, sodium
318368
ini-values: memory_limit=-1
319369

320370
- name: "Install dependencies"
321371
uses: "ramsey/[email protected]"
322372
with:
323373
dependency-versions: "${{ matrix.dependencies }}"
324-
working-directory: "tools/roave-backward-compatibility-check"
374+
working-directory: "tools"
375+
custom-cache-suffix: "ci"
325376

326377
- name: "BC Checks"
327-
run: tools/roave-backward-compatibility-check/vendor/bin/roave-backward-compatibility-check --from=origin/${{ github.base_ref }}
378+
run: tools/vendor/bin/roave-backward-compatibility-check --from=origin/${{ github.base_ref }}

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/.phpcs-cache
22
/.phpunit.cache
33
/phpcs.xml
4-
/tools/roave-backward-compatibility-check/vendor
4+
/tools/vendor
55
/vendor
6+

composer.json

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -32,40 +32,17 @@
3232
}
3333

3434
],
35-
"require-dev": {
36-
"doctrine/coding-standard": "^12.0.0",
37-
"phpstan/phpstan": "^1.10.60",
38-
"phpstan/phpstan-phpunit": "^1.3.16",
39-
"phpunit/phpunit": "^10.5.12",
40-
"vimeo/psalm": "5.23.0",
41-
"roave/infection-static-analysis-plugin": "^1.34.0"
42-
},
4335
"autoload": {
4436
"psr-4": {
4537
"Roave\\BetterReflection\\": "src"
4638
}
4739
},
48-
"autoload-dev": {
49-
"psr-4": {
50-
"Roave\\BetterReflectionTest\\": "test/unit",
51-
"Roave\\BetterReflectionBenchmark\\": "test/benchmark"
52-
}
53-
},
5440
"conflict": {
5541
"thecodingmachine/safe": "<1.1.3"
5642
},
5743
"suggest": {
5844
"composer/composer": "Required to use the ComposerSourceLocator"
5945
},
6046
"minimum-stability": "dev",
61-
"prefer-stable": true,
62-
"config": {
63-
"allow-plugins": {
64-
"dealerdirect/phpcodesniffer-composer-installer": true,
65-
"infection/extension-installer": false
66-
},
67-
"platform": {
68-
"php": "8.1.99"
69-
}
70-
}
47+
"prefer-stable": true
7148
}

0 commit comments

Comments
 (0)