Skip to content

Commit

Permalink
Merge pull request #184 from greg0ire/ramsey-composer-install
Browse files Browse the repository at this point in the history
Maintenance work
  • Loading branch information
greg0ire authored Feb 8, 2021
2 parents d0eeb19 + 13c077e commit 8e397a6
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 39 deletions.
12 changes: 3 additions & 9 deletions .github/workflows/coding-standards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@ on:
pull_request:
branches:
- "*.x"
- "master"
push:
branches:
- "*.x"
- "master"

jobs:
coding-standards:
Expand All @@ -32,15 +30,11 @@ 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-"
dependency-versions: "highest"

- name: "Install dependencies with Composer"
run: "composer install --no-interaction --no-progress --no-suggest"

# https://github.com/doctrine/.github/issues/3
- name: "Run PHP_CodeSniffer"
Expand Down
25 changes: 8 additions & 17 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ jobs:
- "7.3"
- "7.4"
- "8.0"
deps:
- "normal"
dependencies:
- "highest"
include:
- deps: "low"
- dependencies: "lowest"
php-version: "7.2"

steps:
Expand All @@ -45,28 +45,19 @@ 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 --prefer-dist"
if: "${{ matrix.deps == 'normal' }}"

- name: "Install lowest possible dependencies with composer"
run: "composer update --no-interaction --prefer-dist --prefer-lowest"
if: "${{ matrix.deps == 'low' }}"
dependency-versions: "${{ matrix.dependencies }}"
composer-options: "--prefer-dist"

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

- name: "Upload coverage file"
uses: "actions/upload-artifact@v2"
with:
name: "phpunit-${{ matrix.deps }}-${{ matrix.php-version }}.coverage"
name: "phpunit-${{ matrix.dependencies }}-${{ matrix.php-version }}.coverage"
path: "coverage.xml"

upload_coverage:
Expand Down
16 changes: 4 additions & 12 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@ on:
pull_request:
branches:
- "*.x"
- "master"
push:
branches:
- "*.x"
- "master"

jobs:
static-analysis-phpstan:
Expand All @@ -30,17 +28,11 @@ jobs:
with:
coverage: "none"
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 --no-suggest"
dependency-versions: "highest"

- name: "Run a static analysis with phpstan/phpstan"
run: "vendor/bin/phpstan analyse --error-format=checkstyle | cs2pr"
run: "vendor/bin/phpstan analyse"
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
Doctrine Inflector is a small library that can perform string manipulations
with regard to uppercase/lowercase and singular/plural forms of words.

[![Build Status](https://travis-ci.org/doctrine/inflector.svg)](https://travis-ci.org/doctrine/inflector)
[![Build Status](https://github.com/doctrine/inflector/workflows/Continuous%20Integration/badge.svg)](https://github.com/doctrine/inflector/actions?query=workflow%3A%22Continuous+Integration%22+branch%3A4.0.x)
[![Code Coverage](https://codecov.io/gh/doctrine/inflector/branch/2.0.x/graph/badge.svg)](https://codecov.io/gh/doctrine/inflector/branch/2.0.x)

0 comments on commit 8e397a6

Please sign in to comment.