Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use ramsey/composer-install
Browse files Browse the repository at this point in the history
It makes for shorter workflow files.
greg0ire committed Jan 31, 2021

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 86fe3cb commit 494698e
Showing 2 changed files with 17 additions and 30 deletions.
9 changes: 1 addition & 8 deletions .github/workflows/coding-standards.yml
Original file line number Diff line number Diff line change
@@ -24,15 +24,8 @@ 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 update --no-interaction --no-progress --prefer-dist --prefer-stable"
uses: "ramsey/composer-install@v1"

# https://github.com/doctrine/.github/issues/3
- name: "Run PHP_CodeSniffer"
38 changes: 16 additions & 22 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
@@ -26,29 +26,32 @@ jobs:
- "7.3"
- "7.4"
deps:
- "normal"
- "highest"
stability:
- "stable"
symfony-require:
- ""
symfony-deprecations-helper:
- ""
include:
# Tests the lowest set of dependencies
- deps: "low"
- deps: "lowest"
stability: "stable"
php-version: "7.1"
symfony-deprecations-helper: "weak"

# Test against latest Symfony 4.4 dev
- symfony-require: "4.4.*"
php-version: "7.3"
deps: "dev"
stability: "dev"

# Test against latest Symfony 5.2 dev
- symfony-require: "5.2.*"
php-version: "7.3"
deps: "dev"
stability: "dev"

- php-version: "8.0"
deps: "dev"
stability: "dev"
symfony-deprecations-helper: "weak"

steps:
@@ -75,31 +78,22 @@ jobs:
ini-values: "zend.assertions=1"
extensions: "pdo_sqlite"

- 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: "Globally install symfony/flex"
run: "composer global require --no-progress --no-scripts --no-plugins symfony/flex"

- name: "Require symfony/messenger"
run: "composer require --dev symfony/messenger --no-update"
if: "${{ startsWith(matrix.symfony-require, '4.') }}"

- name: "Install stable dependencies with composer"
run: "composer update --no-interaction --prefer-dist --prefer-stable"
if: "${{ matrix.deps == 'normal' }}"
- name: "Enforce using stable dependencies"
run: "composer config minimum-stability stable"
if: "${{ matrix.stability == 'stable' }}"

- name: "Install dev dependencies with composer"
run: "composer update --no-interaction --prefer-dist"
if: "${{ matrix.deps == 'dev' }}"

- name: "Install lowest possible dependencies with composer"
run: "composer update --no-interaction --prefer-dist --prefer-stable --prefer-lowest"
if: "${{ matrix.deps == 'low' }}"
- name: "Install dependencies with Composer"
uses: "ramsey/composer-install@v1"
with:
dependency-versions: "${{ matrix.dependencies }}"
composer-options: "--prefer-dist"

- name: "Run PHPUnit"
run: "vendor/bin/phpunit --coverage-clover=coverage.xml"

0 comments on commit 494698e

Please sign in to comment.