From 2e6618ab15ccbeb610845f29aebec4711342bba7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=B6ller?= Date: Sun, 7 Jan 2024 18:48:35 +0100 Subject: [PATCH] Enhancement: Synchronize with ergebnis/php-package-template --- .github/dependabot.yaml | 2 +- .github/settings.yml | 2 +- .github/workflows/integrate.yaml | 9 --------- .github/workflows/renew.yaml | 3 --- Makefile | 10 +--------- 5 files changed, 3 insertions(+), 23 deletions(-) diff --git a/.github/dependabot.yaml b/.github/dependabot.yaml index da211c1e..fdebab6f 100644 --- a/.github/dependabot.yaml +++ b/.github/dependabot.yaml @@ -1,4 +1,4 @@ -# https://docs.github.com/en/github/administering-a-repository/configuration-options-for-dependency-updates +# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file version: 2 diff --git a/.github/settings.yml b/.github/settings.yml index 057e1e70..a79478b6 100644 --- a/.github/settings.yml +++ b/.github/settings.yml @@ -97,7 +97,7 @@ repository: archived: false default_branch: "main" delete_branch_on_merge: true - description: ":stopwatch: Provides an extension for detecting slow tests in phpunit/phpunit." + description: "⏱️ Provides a composer package with an extension for detecting slow tests in phpunit/phpunit." enable_automated_security_fixes: true enable_vulnerability_alerts: true has_discussions: false diff --git a/.github/workflows/integrate.yaml b/.github/workflows/integrate.yaml index 9eac7f4d..d52c373a 100644 --- a/.github/workflows/integrate.yaml +++ b/.github/workflows/integrate.yaml @@ -136,9 +136,6 @@ jobs: - name: "Run ergebnis/composer-normalize" run: "composer normalize --ansi --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@v3.3.3" with: @@ -329,9 +326,6 @@ jobs: with: dependencies: "${{ matrix.dependencies }}" - - name: "Create cache directory for rector/rector" - run: "mkdir -p .build/rector/" - - name: "Cache cache directory for rector/rector" uses: "actions/cache@v3.3.3" with: @@ -441,9 +435,6 @@ jobs: with: dependencies: "${{ matrix.dependencies }}" - - name: "Create cache directory for vimeo/psalm" - run: "mkdir -p .build/psalm/" - - name: "Run vimeo/psalm" run: "vendor/bin/psalm --config=psalm.xml --output-format=github --shepherd --show-info=false --stats --threads=4" diff --git a/.github/workflows/renew.yaml b/.github/workflows/renew.yaml index 6491e381..82a62627 100644 --- a/.github/workflows/renew.yaml +++ b/.github/workflows/renew.yaml @@ -56,9 +56,6 @@ jobs: with: dependencies: "${{ matrix.dependencies }}" - - 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@v3.3.3" with: diff --git a/Makefile b/Makefile index 4f7f5624..62da19e0 100644 --- a/Makefile +++ b/Makefile @@ -2,16 +2,13 @@ it: refactoring coding-standards security-analysis static-code-analysis tests ## Runs the refactoring, coding-standards, security-analysis, static-code-analysis, and tests targets .PHONY: code-coverage -code-coverage: ## Collects coverage from running unit tests with phpunit/phpunit - mkdir -p .build/phpunit/ +code-coverage: vendor ## Collects coverage from running unit tests with phpunit/phpunit composer config platform.php --unset; composer remove ergebnis/php-cs-fixer-config psalm/plugin-phpunit vimeo/psalm --dev --no-interaction --no-progress; composer require phpunit/phpunit:^7.2.0 --no-interaction --quiet --update-with-all-dependencies; vendor/bin/phpunit --configuration=test/Unit/phpunit.xml --coverage-text; git checkout HEAD -- composer.json composer.lock - .PHONY: coding-standards coding-standards: vendor ## Lints YAML files with yamllint, normalizes composer.json with ergebnis/composer-normalize, and fixes code style issues with friendsofphp/php-cs-fixer yamllint -c .yamllint.yaml --strict . composer normalize - mkdir -p .build/php-cs-fixer/ vendor/bin/php-cs-fixer fix --config=.php-cs-fixer.php --diff --show-progress=dots --verbose .PHONY: dependency-analysis @@ -34,12 +31,10 @@ phar: phive ## Builds a phar with humbug/box .PHONY: phive phive: .phive ## Installs dependencies with phive - mkdir -p .build/phive/ PHIVE_HOME=.build/phive phive install --trust-gpg-keys 0x2DF45277AEF09A2F,0x033E5F8D801A2F8D,0x4AA394086372C20A .PHONY: refactoring refactoring: vendor ## Runs automated refactoring with rector/rector - mkdir -p .build/rector/ vendor/bin/rector process --config=rector.php .PHONY: security-analysis @@ -48,19 +43,16 @@ security-analysis: vendor ## Runs a security analysis with composer .PHONY: static-code-analysis static-code-analysis: vendor ## Runs a static code analysis with vimeo/psalm - mkdir -p .build/psalm/ vendor/bin/psalm --config=psalm.xml --clear-cache vendor/bin/psalm --config=psalm.xml --show-info=false --stats --threads=4 .PHONY: static-code-analysis-baseline static-code-analysis-baseline: vendor ## Generates a baseline for static code analysis with vimeo/psalm - mkdir -p .build/psalm/ vendor/bin/psalm --config=psalm.xml --clear-cache vendor/bin/psalm --config=psalm.xml --set-baseline=psalm-baseline.xml .PHONY: tests tests: ## Runs unit and end-to-end tests with phpunit/phpunit - mkdir -p .build/phpunit/ composer config platform.php --unset; composer remove ergebnis/php-cs-fixer-config psalm/plugin-phpunit vimeo/psalm --dev --no-interaction --no-progress; composer require phpunit/phpunit:^7.5.0 --no-interaction --quiet --update-with-all-dependencies; vendor/bin/phpunit --configuration=test/Unit/phpunit.xml; git checkout HEAD -- composer.json composer.lock composer config platform.php --unset; composer remove ergebnis/php-cs-fixer-config psalm/plugin-phpunit vimeo/psalm --dev --no-interaction --no-progress; composer require phpunit/phpunit:^7.5.0 --no-interaction --quiet --update-with-all-dependencies; vendor/bin/phpunit --configuration=test/EndToEnd/Version07/phpunit.xml; git checkout HEAD -- composer.json composer.lock composer config platform.php --unset; composer remove ergebnis/php-cs-fixer-config psalm/plugin-phpunit vimeo/psalm --dev --no-interaction --no-progress; composer require phpunit/phpunit:^8.5.19 --no-interaction --quiet --update-with-all-dependencies; vendor/bin/phpunit --configuration=test/EndToEnd/Version08/phpunit.xml; git checkout HEAD -- composer.json composer.lock