mirror of
https://github.com/danog/Valinor.git
synced 2024-11-26 20:24:40 +01:00
qa: improve cache and performances of Github actions
This commit is contained in:
parent
3c4d29901a
commit
bf7af18d37
8
.github/workflows/mutation.yml
vendored
8
.github/workflows/mutation.yml
vendored
@ -10,7 +10,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
env:
|
env:
|
||||||
php-version: '8.1'
|
php-version: '8.1'
|
||||||
php-extensions: xdebug, yaml
|
php-extensions: pcov, yaml
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
@ -29,6 +29,12 @@ jobs:
|
|||||||
- name: Creating var directory
|
- name: Creating var directory
|
||||||
run: mkdir -p var/cache
|
run: mkdir -p var/cache
|
||||||
|
|
||||||
|
- name: Cache Mutation results
|
||||||
|
uses: actions/cache@v3.0.8
|
||||||
|
with:
|
||||||
|
path: var/cache
|
||||||
|
key: ${{ runner.os }}-qa-${{ hashFiles('composer.lock') }}-${{ hashFiles('.github/workflows/mutation.yml') }}
|
||||||
|
|
||||||
- name: Running mutation tests
|
- name: Running mutation tests
|
||||||
if: github.ref == 'refs/heads/master'
|
if: github.ref == 'refs/heads/master'
|
||||||
run: php vendor/bin/infection --threads=$(nproc)
|
run: php vendor/bin/infection --threads=$(nproc)
|
||||||
|
10
.github/workflows/quality-assurance.yml
vendored
10
.github/workflows/quality-assurance.yml
vendored
@ -6,7 +6,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
env:
|
env:
|
||||||
php-version: '8.1'
|
php-version: '8.1'
|
||||||
php-extensions: xdebug, yaml
|
php-extensions: yaml
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
@ -18,18 +18,18 @@ jobs:
|
|||||||
extensions: ${{ env.php-extensions }}
|
extensions: ${{ env.php-extensions }}
|
||||||
ini-values: zend.assertions=1
|
ini-values: zend.assertions=1
|
||||||
|
|
||||||
|
- name: Creating var directory
|
||||||
|
run: mkdir -p var/cache
|
||||||
|
|
||||||
- name: Cache QA results
|
- name: Cache QA results
|
||||||
uses: actions/cache@v3.0.8
|
uses: actions/cache@v3.0.8
|
||||||
with:
|
with:
|
||||||
path: var/cache
|
path: var/cache
|
||||||
key: qa-${{ hashFiles('composer.lock') }}
|
key: ${{ runner.os }}-qa-${{ hashFiles('composer.lock') }}-${{ hashFiles('.github/workflows/quality-assurance.yml') }}
|
||||||
|
|
||||||
- name: Checking Composer
|
- name: Checking Composer
|
||||||
run: composer validate --strict
|
run: composer validate --strict
|
||||||
|
|
||||||
- name: Creating var directory
|
|
||||||
run: mkdir -p var/cache
|
|
||||||
|
|
||||||
- uses: "ramsey/composer-install@v2"
|
- uses: "ramsey/composer-install@v2"
|
||||||
|
|
||||||
- name: Running PHPStan
|
- name: Running PHPStan
|
||||||
|
2
.github/workflows/tests.yml
vendored
2
.github/workflows/tests.yml
vendored
@ -17,7 +17,7 @@ jobs:
|
|||||||
- "8.1"
|
- "8.1"
|
||||||
|
|
||||||
env:
|
env:
|
||||||
php-extensions: xdebug, yaml
|
php-extensions: yaml
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
use Rector\Caching\ValueObject\Storage\FileCacheStorage;
|
||||||
use Rector\Config\RectorConfig;
|
use Rector\Config\RectorConfig;
|
||||||
use Rector\Core\Configuration\Option;
|
use Rector\Core\Configuration\Option;
|
||||||
use Rector\Php74\Rector\LNumber\AddLiteralSeparatorToNumberRector;
|
use Rector\Php74\Rector\LNumber\AddLiteralSeparatorToNumberRector;
|
||||||
@ -14,7 +15,10 @@ return static function (RectorConfig $config): void {
|
|||||||
__DIR__ . '/tests',
|
__DIR__ . '/tests',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$config->parameters()->set(Option::CACHE_DIR, 'var/cache/rector');
|
$config->parameters()->set(Option::CACHE_DIR, './var/cache/rector');
|
||||||
|
|
||||||
|
// @see https://github.com/rectorphp/rector/issues/7341
|
||||||
|
$config->parameters()->set(Option::CACHE_CLASS, FileCacheStorage::class);
|
||||||
|
|
||||||
$config->sets([
|
$config->sets([
|
||||||
LevelSetList::UP_TO_PHP_74,
|
LevelSetList::UP_TO_PHP_74,
|
||||||
|
Loading…
Reference in New Issue
Block a user