Skip to content

Commit

Permalink
Use ramsey/composer-install
Browse files Browse the repository at this point in the history
  • Loading branch information
greg0ire committed Feb 18, 2021
1 parent d57a314 commit c35e665
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 24 deletions.
11 changes: 3 additions & 8 deletions .github/workflows/coding-standards.yml
Expand Up @@ -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"
Expand Down
12 changes: 4 additions & 8 deletions .github/workflows/continuous-integration.yml
Expand Up @@ -49,15 +49,11 @@ 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"
composer-options: "--prefer-dist"

- name: "Run PHPUnit"
run: "vendor/bin/phpunit --coverage-clover=coverage.xml"
Expand Down
11 changes: 3 additions & 8 deletions .github/workflows/static-analysis.yml
Expand Up @@ -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"

0 comments on commit c35e665

Please sign in to comment.