From d4d222f87eca9cf87c85624dae6f12576b90e5a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=B6ller?= Date: Thu, 19 Dec 2019 17:31:58 +0100 Subject: [PATCH] Enhancement: Synchronize with ergebnis/php-library-template --- .github/CONTRIBUTING.md | 2 +- .github/settings.yml | 12 ++--- .github/workflows/continuous-integration.yml | 52 +++++++++++++------- Makefile | 2 +- 4 files changed, 43 insertions(+), 25 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 217ebbc3..04ef24b4 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -68,7 +68,7 @@ to run all the tests. We are using [`infection/infection`](https://github.com/infection/infection) to ensure a minimum quality of the tests. -Enable `pcov` or `Xdebug` and run +Enable `Xdebug` and run ``` $ make mutation-tests diff --git a/.github/settings.yml b/.github/settings.yml index fb8cf732..7e2cdfd5 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,9 +25,9 @@ branches: - "Tests (7.4, lowest)" - "Tests (7.4, locked)" - "Tests (7.4, highest)" - - "Code Coverage (7.4)" - - "Mutation Tests (7.4)" - - "Benchmarks (7.4)" + - "Code Coverage (7.4, locked)" + - "Mutation Tests (7.4, locked)" + - "Benchmarks (7.4, locked)" - "codecov/patch" - "codecov/project" strict: false diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index a08e9e5a..398d3025 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -21,12 +21,15 @@ jobs: php-version: - 7.1 + dependencies: + - locked + steps: - name: "Checkout" uses: actions/checkout@v2.0.0 - name: "Install PHP with extensions" - uses: shivammathur/setup-php@1.6.0 + uses: shivammathur/setup-php@1.6.1 with: coverage: none extensions: "mbstring" @@ -39,14 +42,14 @@ jobs: 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 @@ -75,12 +78,15 @@ jobs: php-version: - 7.4 + dependencies: + - locked + steps: - name: "Checkout" uses: actions/checkout@v2.0.0 - name: "Install PHP with extensions" - uses: shivammathur/setup-php@1.6.0 + uses: shivammathur/setup-php@1.6.1 with: coverage: none extensions: "mbstring" @@ -90,15 +96,15 @@ jobs: 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" @@ -110,12 +116,15 @@ jobs: php-version: - 7.4 + dependencies: + - locked + steps: - name: "Checkout" uses: actions/checkout@v2.0.0 - name: "Install PHP with extensions" - uses: shivammathur/setup-php@1.6.0 + uses: shivammathur/setup-php@1.6.1 with: coverage: none extensions: "mbstring" @@ -158,7 +167,7 @@ jobs: uses: actions/checkout@v2.0.0 - name: "Install PHP with extensions" - uses: shivammathur/setup-php@1.6.0 + uses: shivammathur/setup-php@1.6.1 with: coverage: none extensions: "mbstring" @@ -203,12 +212,15 @@ jobs: php-version: - 7.4 + dependencies: + - locked + steps: - name: "Checkout" uses: actions/checkout@v2.0.0 - name: "Install PHP with extensions" - uses: shivammathur/setup-php@1.6.0 + uses: shivammathur/setup-php@1.6.1 with: coverage: xdebug extensions: "mbstring" @@ -218,9 +230,9 @@ jobs: 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 @@ -246,12 +258,15 @@ jobs: php-version: - 7.4 + dependencies: + - locked + steps: - name: "Checkout" uses: actions/checkout@v2.0.0 - name: "Install PHP with extensions" - uses: shivammathur/setup-php@1.6.0 + uses: shivammathur/setup-php@1.6.1 with: coverage: xdebug extensions: "mbstring" @@ -261,7 +276,7 @@ jobs: 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- @@ -281,6 +296,9 @@ jobs: php-version: - 7.4 + dependencies: + - locked + steps: - name: "Checkout" uses: actions/checkout@v2.0.0 @@ -296,9 +314,9 @@ jobs: 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 diff --git a/Makefile b/Makefile index 8bc437af..e99fc80e 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 + 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