-
-
Notifications
You must be signed in to change notification settings - Fork 603
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CI: simplify workflows with
ramsey/composer-install
- Loading branch information
Showing
6 changed files
with
22 additions
and
144 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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/[email protected]" | ||
- name: "Install dependencies" | ||
uses: "ramsey/composer-install@v3" | ||
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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/[email protected]" | ||
- name: "Install dependencies" | ||
uses: "ramsey/composer-install@v3" | ||
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'" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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/[email protected]" | ||
- name: "Install dependencies" | ||
uses: "ramsey/composer-install@v3" | ||
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" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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/[email protected]" | ||
- name: "Install dependencies" | ||
uses: "ramsey/composer-install@v3" | ||
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" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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/[email protected]" | ||
- name: "Install dependencies" | ||
uses: "ramsey/composer-install@v3" | ||
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/[email protected]" | ||
- name: "Install dependencies" | ||
uses: "ramsey/composer-install@v3" | ||
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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/[email protected]" | ||
- name: "Install dependencies" | ||
uses: "ramsey/composer-install@v3" | ||
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" |