-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Greg Korba <wirone@gmail.com>
- Loading branch information
Showing
14 changed files
with
256 additions
and
158 deletions.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
.github/composite-actions/install-composer-deps/action.yml
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: "Install composer deps" | ||
|
||
inputs: | ||
flags: | ||
description: 'Composer flags' | ||
required: false | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Install dependencies | ||
uses: nick-invision/retry@v2 | ||
with: | ||
timeout_minutes: 5 | ||
max_attempts: 5 | ||
retry_wait_seconds: 30 | ||
# `--no-scripts` to avoid side-effects (e.g. installing dev-tools for all jobs on CI level), | ||
# all executed scripts should be explicit and run only when needed. | ||
command: composer update --optimize-autoloader --no-interaction --no-progress --no-scripts ${{ inputs.flags }} | ||
|
||
- name: Show versions of packages | ||
shell: bash | ||
run: composer info -D |
57 changes: 57 additions & 0 deletions
57
.github/composite-actions/setup-php-with-composer-deps/action.yml
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 |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: "Setup PHP with Composer deps" | ||
|
||
inputs: | ||
os: | ||
description: 'OS version' | ||
required: true | ||
php: | ||
description: 'PHP version' | ||
required: true | ||
php-coverage: | ||
description: 'Enable coverage driver' | ||
required: false | ||
default: 'no' | ||
tools: | ||
description: 'tools' | ||
required: false | ||
default: 'none' | ||
composer-flags: | ||
description: 'Composer flags' | ||
required: false | ||
composer-flex-with-symfony-version: | ||
description: 'Sf version to determine with Flex' | ||
required: false | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Resolve PHP tools flag | ||
uses: actions/github-script@v6 | ||
id: setup-php-resolve-tools | ||
with: | ||
script: 'return "${{ inputs.composer-flex-with-symfony-version }}" ? "flex" : "none"' | ||
result-encoding: string | ||
|
||
- name: Resolve PHP coverage flag | ||
uses: actions/github-script@v6 | ||
id: setup-php-resolve-coverage | ||
with: | ||
script: 'return "${{ inputs.php-coverage }}" == "yes" ? "pcov" : "none"' | ||
result-encoding: string | ||
|
||
- name: Setup PHP | ||
uses: ./.github/composite-actions/setup-php | ||
with: | ||
version: ${{ inputs.php }} | ||
coverage: ${{ steps.setup-php-resolve-coverage.outputs.result }} | ||
tools: ${{ steps.setup-php-resolve-tools.outputs.result }}, ${{ inputs.tools }} | ||
|
||
- name: Configure Symfony Flex | ||
if: inputs.composer-flex-with-symfony-version | ||
shell: bash | ||
run: composer config extra.symfony.require ${{ inputs.composer-flex-with-symfony-version }} | ||
|
||
- name: Install Composer deps | ||
uses: ./.github/composite-actions/install-composer-deps | ||
with: | ||
flags: ${{ inputs.composer-flags }} |
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: "Setup PHP" | ||
|
||
inputs: | ||
version: | ||
description: 'PHP version' | ||
required: true | ||
coverage: | ||
description: 'coverage mode' | ||
required: false | ||
default: 'none' | ||
tools: | ||
description: 'tools' | ||
required: false | ||
default: 'none' | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ inputs.version }} | ||
coverage: ${{ inputs.coverage }} | ||
tools: composer, ${{ inputs.tools }} | ||
extensions: none, curl, dom, json, mbstring, opcache, openssl, simplexml, tokenizer, xml, xmlwriter, zip |
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
Oops, something went wrong.