From 4ea0c363d4977cec9f97c44accfbdeed9b9c3f0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=B6ller?= Date: Thu, 19 Dec 2019 10:01:18 +0100 Subject: [PATCH] Enhancement: Synchronize with ergebnis/php-library-template --- .dependabot/config.yml | 18 +--- .github/settings.yml | 10 +- .github/workflows/continuous-integration.yml | 99 +++++++++++--------- Makefile | 2 +- README.md | 4 +- 5 files changed, 66 insertions(+), 67 deletions(-) diff --git a/.dependabot/config.yml b/.dependabot/config.yml index 86591bff..a3bd09e6 100644 --- a/.dependabot/config.yml +++ b/.dependabot/config.yml @@ -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" diff --git a/.github/settings.yml b/.github/settings.yml index bcb0cd72..e7f323ae 100644 --- a/.github/settings.yml +++ b/.github/settings.yml @@ -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)" @@ -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 diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 7e968803..05271a78 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -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" @@ -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" @@ -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') }} @@ -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' @@ -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 @@ -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 diff --git a/Makefile b/Makefile index 81030cf2..9fbc8652 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/README.md b/README.md index 873700ea..311266e0 100644 --- a/README.md +++ b/README.md @@ -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