Skip to content

Commit

Permalink
Merge pull request #18 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 97023f8 + 2ce1234 commit cd96474
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 53 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
81 changes: 48 additions & 33 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,15 @@ 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
extensions: "mbstring"
Expand All @@ -36,29 +39,29 @@ jobs:
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"
run: composer normalize --dry-run

- name: "Create cache directory for friendsofphp/php-cs-fixer"
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 @@ -73,30 +76,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
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 @@ -108,19 +114,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
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 @@ -153,22 +162,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
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 @@ -201,24 +210,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
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 @@ -244,24 +256,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
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 Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,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 cd96474

Please sign in to comment.