diff --git a/.github/workflows/benchmarks.yml b/.github/workflows/benchmarks.yml index 326b2038..21538811 100644 --- a/.github/workflows/benchmarks.yml +++ b/.github/workflows/benchmarks.yml @@ -31,28 +31,10 @@ jobs: ini-values: memory_limit=-1 tools: composer:v2, cs2pr - - name: Get composer cache directory - id: composer-cache - run: echo "composer_cache_dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT - - - name: "Cache dependencies" - uses: "actions/cache@v4.2.0" + - name: "Install dependencies" + uses: "ramsey/composer-install@v3.0.0" with: - path: ${{ steps.composer-cache.outputs.composer_cache_dir }} - key: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('**/composer.lock') }}" - restore-keys: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-" - - - name: "Install lowest dependencies" - if: ${{ matrix.dependencies == 'lowest' }} - run: "composer update --prefer-lowest --no-interaction --no-progress" - - - name: "Install highest dependencies" - if: ${{ matrix.dependencies == 'highest' }} - run: "composer update --no-interaction --no-progress" - - - name: "Install locked dependencies" - if: ${{ matrix.dependencies == 'locked' }} - run: "composer install --no-interaction --no-progress" + dependency-versions: "${{ matrix.dependencies }}" - name: "PhpBench" run: "make phpbench" diff --git a/.github/workflows/coding-standards.yml b/.github/workflows/coding-standards.yml index 5a149522..be26bdba 100644 --- a/.github/workflows/coding-standards.yml +++ b/.github/workflows/coding-standards.yml @@ -31,28 +31,10 @@ jobs: ini-values: memory_limit=-1 tools: composer:v2, cs2pr - - name: Get composer cache directory - id: composer-cache - run: echo "composer_cache_dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT - - - name: "Cache dependencies" - uses: "actions/cache@v4.2.0" + - name: "Install dependencies" + uses: "ramsey/composer-install@v3.0.0" with: - path: ${{ steps.composer-cache.outputs.composer_cache_dir }} - key: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('**/composer.lock') }}" - restore-keys: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-" - - - name: "Install lowest dependencies" - if: ${{ matrix.dependencies == 'lowest' }} - run: "composer update --prefer-lowest --no-interaction --no-progress" - - - name: "Install highest dependencies" - if: ${{ matrix.dependencies == 'highest' }} - run: "composer update --no-interaction --no-progress" - - - name: "Install locked dependencies" - if: ${{ matrix.dependencies == 'locked' }} - run: "composer install --no-interaction --no-progress" + dependency-versions: "${{ matrix.dependencies }}" - name: "Coding Standard" run: "make phpcs PHPCS_FLAGS='-q --report=checkstyle | cs2pr'" diff --git a/.github/workflows/composer-json-lint.yml b/.github/workflows/composer-json-lint.yml index f3130f76..ab008d34 100644 --- a/.github/workflows/composer-json-lint.yml +++ b/.github/workflows/composer-json-lint.yml @@ -31,28 +31,10 @@ jobs: ini-values: memory_limit=-1 tools: composer:v2, composer-normalize, composer-require-checker, composer-unused - - name: Get composer cache directory - id: composer-cache - run: echo "composer_cache_dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT - - - name: "Cache dependencies" - uses: "actions/cache@v4.2.0" + - name: "Install dependencies" + uses: "ramsey/composer-install@v3.0.0" with: - path: ${{ steps.composer-cache.outputs.composer_cache_dir }} - key: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('**/composer.lock') }}" - restore-keys: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-" - - - name: "Install lowest dependencies" - if: ${{ matrix.dependencies == 'lowest' }} - run: "composer update --prefer-lowest --no-interaction --no-progress" - - - name: "Install highest dependencies" - if: ${{ matrix.dependencies == 'highest' }} - run: "composer update --no-interaction --no-progress" - - - name: "Install locked dependencies" - if: ${{ matrix.dependencies == 'locked' }} - run: "composer install --no-interaction --no-progress" + dependency-versions: "${{ matrix.dependencies }}" - name: "Validate composer.json" run: "composer validate --strict" diff --git a/.github/workflows/mutation-tests.yml b/.github/workflows/mutation-tests.yml index 888907bb..add3d950 100644 --- a/.github/workflows/mutation-tests.yml +++ b/.github/workflows/mutation-tests.yml @@ -31,28 +31,10 @@ jobs: ini-values: memory_limit=-1 tools: composer:v2, cs2pr - - name: Get composer cache directory - id: composer-cache - run: echo "composer_cache_dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT - - - name: "Cache dependencies" - uses: "actions/cache@v4.2.0" + - name: "Install dependencies" + uses: "ramsey/composer-install@v3.0.0" with: - path: ${{ steps.composer-cache.outputs.composer_cache_dir }} - key: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('**/composer.lock') }}" - restore-keys: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-" - - - name: "Install lowest dependencies" - if: ${{ matrix.dependencies == 'lowest' }} - run: "composer update --prefer-lowest --no-interaction --no-progress" - - - name: "Install highest dependencies" - if: ${{ matrix.dependencies == 'highest' }} - run: "composer update --no-interaction --no-progress" - - - name: "Install locked dependencies" - if: ${{ matrix.dependencies == 'locked' }} - run: "composer install --no-interaction --no-progress" + dependency-versions: "${{ matrix.dependencies }}" - name: "Infection" run: "make infection PHPUNIT_FLAGS=--coverage-clover=coverage.xml INFECTION_FLAGS=--logger-github" diff --git a/.github/workflows/phpunit.yml b/.github/workflows/phpunit.yml index 7a791761..de677753 100644 --- a/.github/workflows/phpunit.yml +++ b/.github/workflows/phpunit.yml @@ -16,7 +16,6 @@ jobs: - "lowest" - "highest" - "locked" - - "development" php-version: - "8.2" - "8.3" @@ -36,32 +35,10 @@ jobs: ini-values: memory_limit=-1 tools: composer:v2, cs2pr - - name: Get composer cache directory - id: composer-cache - run: echo "composer_cache_dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT - - - name: "Cache dependencies" - uses: "actions/cache@v4.2.0" + - name: "Install dependencies" + uses: "ramsey/composer-install@v3.0.0" with: - path: ${{ steps.composer-cache.outputs.composer_cache_dir }} - key: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('**/composer.lock') }}" - restore-keys: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-" - - - name: "Install lowest dependencies" - if: ${{ matrix.dependencies == 'lowest' }} - run: "composer update --prefer-lowest --no-interaction --no-progress" - - - name: "Install highest dependencies" - if: ${{ matrix.dependencies == 'highest' }} - run: "composer update --no-interaction --no-progress" - - - name: "Install locked dependencies" - if: ${{ matrix.dependencies == 'locked' }} - run: "composer install --no-interaction --no-progress" - - - name: "Install development dependencies" - if: ${{ matrix.dependencies == 'development' }} - run: "composer config minimum-stability dev && composer update --no-interaction --no-progress" + dependency-versions: "${{ matrix.dependencies }}" - name: "Tests" run: "make phpunit" @@ -92,20 +69,11 @@ jobs: ini-values: memory_limit=-1 tools: composer:v2, cs2pr - - name: Get composer cache directory - id: composer-cache - run: echo "composer_cache_dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT - - - name: "Cache dependencies" - uses: "actions/cache@v4.2.0" + - name: "Install dependencies" + uses: "ramsey/composer-install@v3.0.0" with: - path: ${{ steps.composer-cache.outputs.composer_cache_dir }} - key: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('**/composer.lock') }}" - restore-keys: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-" - - - name: "Install locked dependencies" - if: ${{ matrix.dependencies == 'locked' }} - run: "composer install --no-interaction --no-progress --ignore-platform-req=php" + dependency-versions: "${{ matrix.dependencies }}" + composer-options: " --ignore-platform-req=php" - name: "Tests" run: "make phpunit" diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index 2e74302f..5f204d36 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -31,28 +31,10 @@ jobs: ini-values: memory_limit=-1 tools: composer:v2, cs2pr - - name: Get composer cache directory - id: composer-cache - run: echo "composer_cache_dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT - - - name: "Cache dependencies" - uses: "actions/cache@v4.2.0" + - name: "Install dependencies" + uses: "ramsey/composer-install@v3.0.0" with: - path: ${{ steps.composer-cache.outputs.composer_cache_dir }} - key: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('**/composer.lock') }}" - restore-keys: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-" - - - name: "Install lowest dependencies" - if: ${{ matrix.dependencies == 'lowest' }} - run: "composer update --prefer-lowest --no-interaction --no-progress" - - - name: "Install highest dependencies" - if: ${{ matrix.dependencies == 'highest' }} - run: "composer update --no-interaction --no-progress" - - - name: "Install locked dependencies" - if: ${{ matrix.dependencies == 'locked' }} - run: "composer install --no-interaction --no-progress" + dependency-versions: "${{ matrix.dependencies }}" - name: "PHPStan" run: "make phpstan"