From 9be7e7eb20145bdcd9dd877559e58a52f1237c0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Paris?= Date: Thu, 18 Feb 2021 20:12:31 +0100 Subject: [PATCH] Use ramsey/composer-install --- .github/workflows/coding-standards.yml | 11 +++-------- .github/workflows/continuous-integration.yml | 11 +++-------- .github/workflows/static-analysis.yml | 11 +++-------- 3 files changed, 9 insertions(+), 24 deletions(-) diff --git a/.github/workflows/coding-standards.yml b/.github/workflows/coding-standards.yml index 92981b1..e27f3ea 100644 --- a/.github/workflows/coding-standards.yml +++ b/.github/workflows/coding-standards.yml @@ -33,15 +33,10 @@ jobs: php-version: "${{ matrix.php-version }}" tools: "cs2pr" - - name: "Cache dependencies installed with Composer" - uses: "actions/cache@v2" - with: - path: "~/.composer/cache" - key: "php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }}" - restore-keys: "php-${{ matrix.php-version }}-composer-locked-" - - name: "Install dependencies with Composer" - run: "composer install --no-interaction --no-progress" + uses: "ramsey/composer-install@v1" + with: + dependency-versions: "highest" # https://github.com/doctrine/.github/issues/3 - name: "Run PHP_CodeSniffer" diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 9d353b2..9ddb11e 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -49,15 +49,10 @@ jobs: coverage: "pcov" ini-values: "zend.assertions=1" - - name: "Cache dependencies installed with composer" - uses: "actions/cache@v2" + - name: "Install dependencies with Composer" + uses: "ramsey/composer-install@v1" with: - path: "~/.composer/cache" - key: "php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }}" - restore-keys: "php-${{ matrix.php-version }}-composer-locked-" - - - name: "Install dependencies with composer" - run: "composer update --no-interaction --no-progress" + dependency-versions: "highest" - name: "Run PHPUnit" run: "vendor/bin/phpunit --coverage-clover=coverage.xml" diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index 4a58318..0745e74 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -33,15 +33,10 @@ jobs: php-version: "${{ matrix.php-version }}" tools: "cs2pr" - - name: "Cache dependencies installed with composer" - uses: "actions/cache@v2" + - name: "Install dependencies with Composer" + uses: "ramsey/composer-install@v1" with: - path: "~/.composer/cache" - key: "php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }}" - restore-keys: "php-${{ matrix.php-version }}-composer-locked-" - - - name: "Install dependencies with composer" - run: "composer install --no-interaction --no-progress" + dependency-versions: "highest" - name: "Run a static analysis with phpstan/phpstan" run: "vendor/bin/phpstan analyse --error-format=checkstyle | cs2pr"