generated from ergebnis/php-package-template
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #24 from ergebnis/feature/synchronize
Enhancement: Synchronize with `ergebnis/php-package-template`
- Loading branch information
Showing
8 changed files
with
124 additions
and
144 deletions.
There are no files selected for viewing
16 changes: 0 additions & 16 deletions
16
.github/actions/composer/composer/determine-cache-directory/action.yaml
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -8,9 +8,6 @@ on: # yamllint disable-line rule:truthy | |
branches: | ||
- "main" | ||
|
||
env: | ||
PHP_EXTENSIONS: "mbstring" | ||
|
||
jobs: | ||
code-coverage: | ||
name: "Code Coverage" | ||
|
@@ -33,14 +30,17 @@ jobs: | |
uses: "shivammathur/[email protected]" | ||
with: | ||
coverage: "xdebug" | ||
extensions: "${{ env.PHP_EXTENSIONS }}" | ||
extensions: "none, ctype, dom, json, mbstring, phar, simplexml, tokenizer, xml, xmlwriter" | ||
php-version: "${{ matrix.php-version }}" | ||
|
||
- 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: "Determine composer cache directory" | ||
uses: "./.github/actions/composer/composer/determine-cache-directory" | ||
uses: "ergebnis/.github/actions/composer/determine-cache-directory@1.2.1" | ||
|
||
- name: "Cache dependencies installed with composer" | ||
uses: "actions/[email protected]" | ||
|
@@ -50,11 +50,13 @@ jobs: | |
restore-keys: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-" | ||
|
||
- name: "Install ${{ matrix.dependencies }} dependencies with composer" | ||
uses: "./.github/actions/composer/composer/install" | ||
uses: "ergebnis/.github/actions/composer/install@1.2.1" | ||
with: | ||
dependencies: "${{ matrix.dependencies }}" | ||
|
||
- name: "Collect code coverage with Xdebug and phpunit/phpunit" | ||
env: | ||
XDEBUG_MODE: "coverage" | ||
run: "vendor/bin/phpunit --configuration=test/Unit/phpunit.xml --coverage-clover=.build/phpunit/logs/clover.xml" | ||
|
||
- name: "Send code coverage report to Codecov.io" | ||
|
@@ -90,14 +92,17 @@ jobs: | |
uses: "shivammathur/[email protected]" | ||
with: | ||
coverage: "none" | ||
extensions: "${{ env.PHP_EXTENSIONS }}" | ||
extensions: "none, ctype, dom, json, mbstring, phar, simplexml, tokenizer, xml, xmlwriter" | ||
php-version: "${{ matrix.php-version }}" | ||
|
||
- name: "Set up problem matchers for PHP" | ||
run: "echo \"::add-matcher::${{ runner.tool_cache }}/php.json\"" | ||
|
||
- name: "Validate composer.json and composer.lock" | ||
run: "composer validate --strict" | ||
run: "composer validate --ansi --strict" | ||
|
||
- name: "Determine composer cache directory" | ||
uses: "./.github/actions/composer/composer/determine-cache-directory" | ||
uses: "ergebnis/.github/actions/composer/determine-cache-directory@1.2.1" | ||
|
||
- name: "Cache dependencies installed with composer" | ||
uses: "actions/[email protected]" | ||
|
@@ -107,12 +112,12 @@ jobs: | |
restore-keys: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-" | ||
|
||
- name: "Install ${{ matrix.dependencies }} dependencies with composer" | ||
uses: "./.github/actions/composer/composer/install" | ||
uses: "ergebnis/.github/actions/composer/install@1.2.1" | ||
with: | ||
dependencies: "${{ matrix.dependencies }}" | ||
|
||
- name: "Run ergebnis/composer-normalize" | ||
run: "composer normalize --dry-run" | ||
run: "composer normalize --ansi --dry-run" | ||
|
||
- name: "Create cache directory for friendsofphp/php-cs-fixer" | ||
run: "mkdir -p .build/php-cs-fixer" | ||
|
@@ -148,11 +153,14 @@ jobs: | |
uses: "shivammathur/[email protected]" | ||
with: | ||
coverage: "none" | ||
extensions: "${{ env.PHP_EXTENSIONS }}" | ||
extensions: "none, ctype, dom, json, mbstring, phar, simplexml, tokenizer, xml, xmlwriter" | ||
php-version: "${{ matrix.php-version }}" | ||
|
||
- name: "Set up problem matchers for PHP" | ||
run: "echo \"::add-matcher::${{ runner.tool_cache }}/php.json\"" | ||
|
||
- name: "Determine composer cache directory" | ||
uses: "./.github/actions/composer/composer/determine-cache-directory" | ||
uses: "ergebnis/.github/actions/composer/determine-cache-directory@1.2.1" | ||
|
||
- name: "Cache dependencies installed with composer" | ||
uses: "actions/[email protected]" | ||
|
@@ -162,7 +170,7 @@ jobs: | |
restore-keys: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-" | ||
|
||
- name: "Install ${{ matrix.dependencies }} dependencies with composer" | ||
uses: "./.github/actions/composer/composer/install" | ||
uses: "ergebnis/.github/actions/composer/install@1.2.1" | ||
with: | ||
dependencies: "${{ matrix.dependencies }}" | ||
|
||
|
@@ -190,11 +198,14 @@ jobs: | |
uses: "shivammathur/[email protected]" | ||
with: | ||
coverage: "none" | ||
extensions: "${{ env.PHP_EXTENSIONS }}" | ||
extensions: "none, ctype, curl, dom, json, mbstring, pcntl, phar, posix, simplexml, tokenizer, xml, xmlwriter" | ||
php-version: "${{ matrix.php-version }}" | ||
|
||
- name: "Set up problem matchers for PHP" | ||
run: "echo \"::add-matcher::${{ runner.tool_cache }}/php.json\"" | ||
|
||
- name: "Determine composer cache directory" | ||
uses: "./.github/actions/composer/composer/determine-cache-directory" | ||
uses: "ergebnis/.github/actions/composer/determine-cache-directory@1.2.1" | ||
|
||
- name: "Cache dependencies installed with composer" | ||
uses: "actions/[email protected]" | ||
|
@@ -204,15 +215,15 @@ jobs: | |
restore-keys: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-" | ||
|
||
- name: "Install ${{ matrix.dependencies }} dependencies with composer" | ||
uses: "./.github/actions/composer/composer/install" | ||
uses: "ergebnis/.github/actions/composer/install@1.2.1" | ||
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 --diff --shepherd --show-info=false --stats --threads=4" | ||
run: "vendor/bin/psalm --config=psalm.xml --output-format=github --shepherd --show-info=false --stats --threads=4" | ||
|
||
tests: | ||
name: "Tests" | ||
|
@@ -239,14 +250,17 @@ jobs: | |
uses: "shivammathur/[email protected]" | ||
with: | ||
coverage: "none" | ||
extensions: "${{ env.PHP_EXTENSIONS }}" | ||
extensions: "none, ctype, dom, json, mbstring, phar, simplexml, tokenizer, xml, xmlwriter" | ||
php-version: "${{ matrix.php-version }}" | ||
|
||
- 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: "Determine composer cache directory" | ||
uses: "./.github/actions/composer/composer/determine-cache-directory" | ||
uses: "ergebnis/.github/actions/composer/determine-cache-directory@1.2.1" | ||
|
||
- name: "Cache dependencies installed with composer" | ||
uses: "actions/[email protected]" | ||
|
@@ -256,7 +270,7 @@ jobs: | |
restore-keys: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-" | ||
|
||
- name: "Install ${{ matrix.dependencies }} dependencies with composer" | ||
uses: "./.github/actions/composer/composer/install" | ||
uses: "ergebnis/.github/actions/composer/install@1.2.1" | ||
with: | ||
dependencies: "${{ matrix.dependencies }}" | ||
|
||
|
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 |
---|---|---|
|
@@ -15,15 +15,23 @@ jobs: | |
|
||
steps: | ||
- name: "Determine tag" | ||
id: "determine-tag" | ||
run: "echo \"::set-output name=tag::${GITHUB_REF#refs/tags/}\"" | ||
run: "echo \"RELEASE_TAG=${GITHUB_REF#refs/tags/}\" >> $GITHUB_ENV" | ||
|
||
- name: "Create release" | ||
uses: "actions/[email protected]" | ||
env: | ||
GITHUB_TOKEN: "${{ secrets.ERGEBNIS_BOT_TOKEN }}" | ||
uses: "actions/github-script@v5" | ||
with: | ||
draft: false | ||
prerelease: false | ||
release_name: "${{ steps.determine-tag.outputs.tag }}" | ||
tag_name: "${{ steps.determine-tag.outputs.tag }}" | ||
github-token: "${{ secrets.ERGEBNIS_BOT_TOKEN }}" | ||
script: | | ||
try { | ||
await github.rest.repos.createRelease({ | ||
draft: false, | ||
generate_release_notes: true, | ||
name: process.env.RELEASE_TAG, | ||
owner: context.repo.owner, | ||
prerelease: false, | ||
repo: context.repo.repo, | ||
tag_name: process.env.RELEASE_TAG, | ||
}); | ||
} catch (error) { | ||
core.setFailed(error.message); | ||
} |
Oops, something went wrong.