-
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enhancement: Synchronize with ergebnis/php-package-template
- Loading branch information
1 parent
3eb2555
commit 054145c
Showing
9 changed files
with
26 additions
and
112 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,9 +40,6 @@ jobs: | |
- name: "Set up problem matchers for PHP" | ||
run: "echo \"::add-matcher::${{ runner.tool_cache }}/php.json\"" | ||
|
||
- name: "Set up problem matchers for phpunit/phpunit" | ||
run: "echo \"::add-matcher::${{ runner.tool_cache }}/phpunit.json\"" | ||
|
||
- name: "Validate composer.json and composer.lock" | ||
run: "composer validate --ansi --strict" | ||
|
||
|
@@ -188,9 +185,6 @@ jobs: | |
- name: "Run ergebnis/composer-normalize" | ||
run: ".phive/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/[email protected]" | ||
with: | ||
|
@@ -201,83 +195,7 @@ jobs: | |
php-${{ matrix.php-version }}-php-cs-fixer- | ||
- name: "Run friendsofphp/php-cs-fixer" | ||
run: "vendor/bin/php-cs-fixer fix --ansi --config=.php-cs-fixer.php --diff --dry-run --verbose" | ||
|
||
compile-phar: | ||
name: "Compile Phar" | ||
|
||
runs-on: "ubuntu-latest" | ||
|
||
timeout-minutes: 5 | ||
|
||
strategy: | ||
matrix: | ||
php-version: | ||
- "8.1" | ||
|
||
dependencies: | ||
- "locked" | ||
|
||
env: | ||
COMPOSER_NORMALIZE_PHAR: ".build/phar/composer-normalize.phar" | ||
COMPOSER_VERSION: "2.6.6" | ||
|
||
steps: | ||
- name: "Checkout" | ||
uses: "actions/[email protected]" | ||
|
||
- name: "Set up PHP" | ||
uses: "shivammathur/[email protected]" | ||
with: | ||
coverage: "none" | ||
extensions: "none, bcmath, ctype, dom, intl, json, mbstring, phar, simplexml, tokenizer, xml, xmlwriter" | ||
ini-values: "memory_limit=-1, phar.readonly=0" | ||
php-version: "${{ matrix.php-version }}" | ||
tools: "phive" | ||
|
||
- name: "Set up problem matchers for PHP" | ||
run: "echo \"::add-matcher::${{ runner.tool_cache }}/php.json\"" | ||
|
||
- name: "Determine composer cache directory" | ||
uses: "ergebnis/.github/actions/composer/[email protected]" | ||
|
||
- name: "Cache dependencies installed with composer" | ||
uses: "actions/[email protected]" | ||
with: | ||
path: "${{ env.COMPOSER_CACHE_DIR }}" | ||
key: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('composer.lock') }}" | ||
restore-keys: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-" | ||
|
||
- name: "Install ${{ matrix.dependencies }} dependencies with composer" | ||
uses: "ergebnis/.github/actions/composer/[email protected]" | ||
with: | ||
dependencies: "${{ matrix.dependencies }}" | ||
|
||
- name: "Require composer/composer" | ||
run: "composer require composer/composer:${{ env.COMPOSER_VERSION }} --ansi --no-interaction --no-progress" | ||
|
||
- name: "Remove git placeholder configuration with jq" | ||
run: "echo $(cat box.json | jq 'del(.git)') > box.json" | ||
|
||
- name: "Install dependencies with phive" | ||
uses: "ergebnis/.github/actions/phive/[email protected]" | ||
with: | ||
trust-gpg-keys: "0xC00543248C87FB13,0x033E5F8D801A2F8D,0x2DF45277AEF09A2F" | ||
|
||
- name: "Validate configuration for humbug/box" | ||
run: ".phive/box validate box.json --ansi" | ||
|
||
- name: "Compile composer-normalize.phar with humbug/box" | ||
run: ".phive/box compile --ansi --config=box.json" | ||
|
||
- name: "Show info about composer-normalize.phar with humbug/box" | ||
run: ".phive/box info ${{ env.COMPOSER_NORMALIZE_PHAR }} --ansi" | ||
|
||
- name: "Run composer-normalize.phar" | ||
run: "${{ env.COMPOSER_NORMALIZE_PHAR }} --ansi" | ||
|
||
- name: "Run composer-normalize.phar with argument and options" | ||
run: "${{ env.COMPOSER_NORMALIZE_PHAR }} --dry-run --no-ansi composer.json" | ||
run: "vendor/bin/php-cs-fixer fix --ansi --config=.php-cs-fixer.php --diff --dry-run --show-progress=dots --verbose" | ||
|
||
dependency-analysis: | ||
name: "Dependency Analysis" | ||
|
@@ -330,7 +248,7 @@ jobs: | |
- name: "Install dependencies with phive" | ||
uses: "ergebnis/.github/actions/phive/[email protected]" | ||
with: | ||
trust-gpg-keys: "0xC00543248C87FB13,0x033E5F8D801A2F8D,0x2DF45277AEF09A2F" | ||
trust-gpg-keys: "0x033E5F8D801A2F8D" | ||
|
||
- name: "Run maglnet/composer-require-checker" | ||
run: ".phive/composer-require-checker check --ansi --config-file=$(pwd)/composer-require-checker.json --verbose" | ||
|
@@ -434,9 +352,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/[email protected]" | ||
with: | ||
|
@@ -546,8 +461,8 @@ jobs: | |
with: | ||
dependencies: "${{ matrix.dependencies }}" | ||
|
||
- name: "Create cache directory for vimeo/psalm" | ||
run: "mkdir -p .build/psalm/" | ||
- name: "Run phpstan/phpstan" | ||
run: "vendor/bin/phpstan --ansi --configuration=phpstan.neon --memory-limit=-1" | ||
|
||
- name: "Run vimeo/psalm" | ||
run: "vendor/bin/psalm --config=psalm.xml --output-format=github --shepherd --show-info=false --stats --threads=4" | ||
|
@@ -612,7 +527,4 @@ jobs: | |
dependencies: "${{ matrix.dependencies }}" | ||
|
||
- name: "Run unit tests with phpunit/phpunit" | ||
run: "vendor/bin/phpunit --colors=always --configuration=test/phpunit.xml --testsuite=unit" | ||
|
||
- name: "Run integration tests with phpunit/phpunit" | ||
run: "vendor/bin/phpunit --colors=always --configuration=test/phpunit.xml --testsuite=integration" | ||
run: "vendor/bin/phpunit --colors=always --configuration=test/Unit/phpunit.xml" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -132,3 +132,16 @@ jobs: | |
core.setFailed(error.message); | ||
} | ||
} | ||
- name: "Post to twitter.com about release" | ||
uses: "Eomm/[email protected]" | ||
env: | ||
TWITTER_ACCESS_TOKEN: "${{ secrets.ERGEBNIS_TWITTER_ACCESS_TOKEN }}" | ||
TWITTER_ACCESS_TOKEN_SECRET: "${{ secrets.ERGEBNIS_TWITTER_ACCESS_TOKEN_SECRET }}" | ||
TWITTER_CONSUMER_API_KEY: "${{ secrets.ERGEBNIS_TWITTER_CONSUMER_API_KEY }}" | ||
TWITTER_CONSUMER_API_SECRET: "${{ secrets.ERGEBNIS_TWITTER_CONSUMER_API_KEY_SECRET }}" | ||
with: | ||
tweet-message: | | ||
🎵 Just released: ${{ github.event.repository.owner.login }}/${{ github.event.repository.name }}:${{ env.RELEASE_TAG }}. | ||
${{ env.RELEASE_HTML_URL }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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/[email protected]" | ||
with: | ||
|
@@ -69,7 +66,7 @@ jobs: | |
php-${{ matrix.php-version }}-php-cs-fixer- | ||
- name: "Run friendsofphp/php-cs-fixer" | ||
run: "vendor/bin/php-cs-fixer fix --ansi --config=.php-cs-fixer.php --diff --verbose" | ||
run: "vendor/bin/php-cs-fixer fix --ansi --config=.php-cs-fixer.php --diff --show-progress=dots --verbose" | ||
|
||
- name: "Commit modified files" | ||
uses: "stefanzweifel/[email protected]" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters