Skip to content

Commit

Permalink
Merge pull request #77 from ergebnis/feature/synchronize
Browse files Browse the repository at this point in the history
Enhancement: Synchronize with ergebnis/php-library-template
  • Loading branch information
localheinz authored Dec 19, 2019
2 parents fd5ad93 + ac8c25d commit c7985dc
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 60 deletions.
15 changes: 1 addition & 14 deletions .dependabot/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,6 @@ update_configs:
default_reviewers:
- "localheinz"
directory: "/"
package_manager: "github_actions"
update_schedule: "daily"

- automerged_updates:
- match:
dependency_type: "development"
default_assignees:
- "localheinz"
default_labels:
- "dependency"
default_reviewers:
- "localheinz"
directory: "/"
package_manager: "php:composer"
update_schedule: "daily"
update_schedule: "live"
version_requirement_updates: "increase_versions"
10 changes: 5 additions & 5 deletions .github/settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ branches:
required_approving_review_count: 1
required_status_checks:
contexts:
- "Coding Standards (7.1)"
- "Dependency Analysis (7.4)"
- "Static Code Analysis (7.4)"
- "Coding Standards (7.1, locked)"
- "Dependency Analysis (7.4, locked)"
- "Static Code Analysis (7.4, locked)"
- "Tests (7.1, lowest)"
- "Tests (7.1, locked)"
- "Tests (7.1, highest)"
Expand All @@ -25,8 +25,8 @@ branches:
- "Tests (7.4, lowest)"
- "Tests (7.4, locked)"
- "Tests (7.4, highest)"
- "Code Coverage (7.4)"
- "Mutation Tests (7.4)"
- "Code Coverage (7.4, locked)"
- "Mutation Tests (7.4, locked)"
- "codecov/patch"
- "codecov/project"
strict: false
Expand Down
95 changes: 55 additions & 40 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,32 +21,35 @@ jobs:
php-version:
- 7.1

dependencies:
- locked

steps:
- name: "Checkout"
uses: actions/checkout@v1
uses: actions/checkout@v2.0.0

- name: "Install PHP with extensions"
uses: shivammathur/setup-php@v1
uses: shivammathur/setup-php@1.6.1
with:
coverage: none
extension-csv: "mbstring"
extensions: "mbstring"
php-version: ${{ matrix.php-version }}

- name: "Validate composer.json and composer.lock"
run: composer validate --strict

- name: "Cache dependencies installed with composer"
uses: actions/cache@v1
uses: actions/cache@v1.0.3
with:
path: ~/.composer/cache
key: php${{ matrix.php-version }}-composer-locked-${{ hashFiles('**/composer.lock') }}
key: php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('**/composer.lock') }}
restore-keys: |
php${{ matrix.php-version }}-composer-locked-
php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-
- name: "Install locked dependencies with composer"
run: composer install --no-interaction --no-progress --no-suggest

- name: "Run localheinz/composer-normalize"
- name: "Run ergebnis/composer-normalize"
uses: docker://localheinz/composer-normalize-action:0.5.2
with:
args: --dry-run
Expand All @@ -55,12 +58,12 @@ jobs:
run: mkdir -p .build/php-cs-fixer

- name: "Cache cache directory for friendsofphp/php-cs-fixer"
uses: actions/cache@v1
uses: actions/cache@v1.0.3
with:
path: .build/php-cs-fixer
key: php${{ matrix.php-version }}-php-cs-fixer-${{ hashFiles('**/composer.lock') }}
key: php-${{ matrix.php-version }}-php-cs-fixer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
php${{ matrix.php-version }}-php-cs-fixer-
php-${{ matrix.php-version }}-php-cs-fixer-
- name: "Run friendsofphp/php-cs-fixer"
run: vendor/bin/php-cs-fixer fix --config=.php_cs --diff --diff-format=udiff --dry-run --verbose
Expand All @@ -75,30 +78,33 @@ jobs:
php-version:
- 7.4

dependencies:
- locked

steps:
- name: "Checkout"
uses: actions/checkout@v1
uses: actions/checkout@v2.0.0

- name: "Install PHP with extensions"
uses: shivammathur/setup-php@v1
uses: shivammathur/setup-php@1.6.1
with:
coverage: none
extension-csv: "mbstring"
extensions: "mbstring"
php-version: ${{ matrix.php-version }}

- name: "Cache dependencies installed with composer"
uses: actions/cache@v1
uses: actions/cache@v1.0.3
with:
path: ~/.composer/cache
key: php${{ matrix.php-version }}-composer-locked-${{ hashFiles('**/composer.lock') }}
key: php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('**/composer.lock') }}
restore-keys: |
php${{ matrix.php-version }}-composer-locked-
php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-
- name: "Install locked dependencies with composer"
run: composer install --no-interaction --no-progress --no-suggest

- name: "Run maglnet/composer-require-checker"
uses: docker://localheinz/composer-require-checker-action:1.1.1
uses: docker://webfactory/composer-require-checker:2.0.0

static-code-analysis:
name: "Static Code Analysis"
Expand All @@ -110,19 +116,22 @@ jobs:
php-version:
- 7.4

dependencies:
- locked

steps:
- name: "Checkout"
uses: actions/checkout@v1
uses: actions/checkout@v2.0.0

- name: "Install PHP with extensions"
uses: shivammathur/setup-php@v1
uses: shivammathur/setup-php@1.6.1
with:
coverage: none
extension-csv: "mbstring"
extensions: "mbstring"
php-version: ${{ matrix.php-version }}

- name: "Cache dependencies installed with composer"
uses: actions/cache@v1
uses: actions/cache@v1.0.3
with:
path: ~/.composer/cache
key: ${{ matrix.php-version }}-composer-locked-${{ hashFiles('**/composer.lock') }}
Expand Down Expand Up @@ -155,22 +164,22 @@ jobs:

steps:
- name: "Checkout"
uses: actions/checkout@v1
uses: actions/checkout@v2.0.0

- name: "Install PHP with extensions"
uses: shivammathur/setup-php@v1
uses: shivammathur/setup-php@1.6.1
with:
coverage: none
extension-csv: "mbstring"
extensions: "mbstring"
php-version: ${{ matrix.php-version }}

- name: "Cache dependencies installed with composer"
uses: actions/cache@v1
uses: actions/cache@v1.0.3
with:
path: ~/.composer/cache
key: php${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('**/composer.lock') }}
key: php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('**/composer.lock') }}
restore-keys: |
php${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-
php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-
- name: "Install lowest dependencies with composer"
if: matrix.dependencies == 'lowest'
Expand Down Expand Up @@ -203,24 +212,27 @@ jobs:
php-version:
- 7.4

dependencies:
- locked

steps:
- name: "Checkout"
uses: actions/checkout@v1
uses: actions/checkout@v2.0.0

- name: "Install PHP with extensions"
uses: shivammathur/setup-php@v1
uses: shivammathur/setup-php@1.6.1
with:
coverage: xdebug
extension-csv: "mbstring"
extensions: "mbstring"
php-version: ${{ matrix.php-version }}

- name: "Cache dependencies installed with composer"
uses: actions/cache@v1
uses: actions/cache@v1.0.3
with:
path: ~/.composer/cache
key: php${{ matrix.php-version }}-composer-locked-${{ hashFiles('**/composer.lock') }}
key: php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('**/composer.lock') }}
restore-keys: |
php${{ matrix.php-version }}-composer-locked-
php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-
- name: "Install locked dependencies with composer"
run: composer install --no-interaction --no-progress --no-suggest
Expand All @@ -246,27 +258,30 @@ jobs:
php-version:
- 7.4

dependencies:
- locked

steps:
- name: "Checkout"
uses: actions/checkout@v1
uses: actions/checkout@v2.0.0

- name: "Install PHP with extensions"
uses: shivammathur/setup-php@v1
uses: shivammathur/setup-php@1.6.1
with:
coverage: xdebug
extension-csv: "mbstring"
extensions: "mbstring"
php-version: ${{ matrix.php-version }}

- name: "Cache dependencies installed with composer"
uses: actions/cache@v1
uses: actions/cache@v1.0.3
with:
path: ~/.composer/cache
key: php${{ matrix.php-version }}-composer-locked-${{ hashFiles('**/composer.lock') }}
key: php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('**/composer.lock') }}
restore-keys: |
php${{ matrix.php-version }}-composer-locked-
php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-
- name: "Install locked dependencies with composer"
run: composer install --no-interaction --no-progress --no-suggest

- name: "Run mutation tests with infection/infection"
- name: "Run mutation tests with Xdebug and infection/infection"
run: vendor/bin/infection --ignore-msi-with-no-mutations --min-covered-msi=92 --min-msi=92
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ coding-standards: vendor ## Fixes code style issues with friendsofphp/php-cs-fix

.PHONY: dependency-analysis
dependency-analysis: vendor ## Runs a dependency analysis with maglnet/composer-require-checker
docker run --interactive --rm --tty --workdir=/app --volume ${PWD}:/app localheinz/composer-require-checker-action:1.1.1
docker run --interactive --rm --tty --volume ${PWD}:/app webfactory/composer-require-checker:2.0.0

.PHONY: help
help: ## Displays this list of targets with descriptions
Expand Down

0 comments on commit c7985dc

Please sign in to comment.