Skip to content

Commit db8a7df

Browse files
committed
chore: Add rector cache to workflows and template rector.php
1 parent a5f95d8 commit db8a7df

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

rector.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
declare(strict_types=1);
44

5+
use Rector\Caching\ValueObject\Storage\FileCacheStorage;
56
use Rector\CodeQuality\Rector\BooleanAnd\SimplifyEmptyArrayCheckRector;
67
use Rector\CodeQuality\Rector\Class_\CompleteDynamicPropertiesRector;
78
use Rector\CodeQuality\Rector\Empty_\SimplifyEmptyCheckOnEmptyArrayRector;
@@ -50,6 +51,12 @@
5051

5152
$rectorConfig->parallel();
5253

54+
// Github action cache
55+
$rectorConfig->cacheClass(FileCacheStorage::class);
56+
if (is_dir('/tmp')) {
57+
$rectorConfig->cacheDirectory('/tmp/rector');
58+
}
59+
5360
// The paths to refactor (can also be supplied with CLI arguments)
5461
$rectorConfig->paths([
5562
__DIR__ . '/src/',

0 commit comments

Comments
 (0)