Skip to content
This repository has been archived by the owner on Jan 4, 2022. It is now read-only.

Enhancement: Synchronize with ergebnis/php-library-template #156

Merged
merged 1 commit into from
Dec 19, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 1 addition & 17 deletions .dependabot/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +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: "/"
ignored_updates:
- match:
dependency_name: "phpunit/phpunit"
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
99 changes: 57 additions & 42 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,46 +21,49 @@ 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"
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 for source"
- name: "Run friendsofphp/php-cs-fixer"
run: vendor/bin/php-cs-fixer fix --config=.php_cs --diff --diff-format=udiff --dry-run --verbose

- name: "Run friendsofphp/php-cs-fixer for test fixtures"
Expand All @@ -76,32 +79,35 @@ 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
with:
args: --config-file=composer-require-checker.json
args: check --config-file=composer-require-checker.json

static-code-analysis:
name: "Static Code Analysis"
Expand All @@ -113,19 +119,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 @@ -158,22 +167,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 @@ -206,24 +215,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 @@ -249,27 +261,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=95 --min-msi=95
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,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 --config-file=composer-require-checker.json
docker run --interactive --rm --tty --volume ${PWD}:/app webfactory/composer-require-checker:2.0.0 check --config-file=composer-require-checker.json

.PHONY: help
help: ## Displays this list of targets with descriptions
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,11 @@ Please have a look at [`CHANGELOG.md`](CHANGELOG.md).

## Contributing

Please have a look at [`CODE_OF_CONDUCT.md`](https://github.com/ergebnis/.github/blob/master/CODE_OF_CONDUCT.md).
Please have a look at [`CONTRIBUTING.md`](.github/CONTRIBUTING.md).

## Code of Conduct

Please have a look at [`CODE_OF_CONDUCT.md`](.github/CODE_OF_CONDUCT.md).
Please have a look at [`CODE_OF_CONDUCT.md`](https://github.com/ergebnis/.github/blob/master/CODE_OF_CONDUCT.md).

## License

Expand Down