mirror of
https://github.com/shlinkio/shlink.git
synced 2024-12-18 00:52:07 +03:00
Improved cache keys for extensions in CI workflow to support several PHP versions when needed
This commit is contained in:
parent
be82204df2
commit
1613975e0e
6 changed files with 36 additions and 6 deletions
2
.github/workflows/ci-db-tests.yml
vendored
2
.github/workflows/ci-db-tests.yml
vendored
|
@ -32,7 +32,7 @@ jobs:
|
||||||
with:
|
with:
|
||||||
php-version: ${{ matrix.php-version }}
|
php-version: ${{ matrix.php-version }}
|
||||||
extensions: ${{ env.extensions }}
|
extensions: ${{ env.extensions }}
|
||||||
key: db-tests-extensions-${{ inputs.platform }}
|
key: db-tests-extensions-${{ matrix.php-version }}-${{ inputs.platform }}
|
||||||
- name: Cache extensions
|
- name: Cache extensions
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
|
|
2
.github/workflows/ci-mutation-tests.yml
vendored
2
.github/workflows/ci-mutation-tests.yml
vendored
|
@ -25,7 +25,7 @@ jobs:
|
||||||
with:
|
with:
|
||||||
php-version: ${{ matrix.php-version }}
|
php-version: ${{ matrix.php-version }}
|
||||||
extensions: ${{ env.extensions }}
|
extensions: ${{ env.extensions }}
|
||||||
key: mutation-tests-extensions-${{ inputs.test-group }}
|
key: mutation-tests-extensions-${{ matrix.php-version }}-${{ inputs.test-group }}
|
||||||
- name: Cache extensions
|
- name: Cache extensions
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
|
|
2
.github/workflows/ci-tests.yml
vendored
2
.github/workflows/ci-tests.yml
vendored
|
@ -31,7 +31,7 @@ jobs:
|
||||||
with:
|
with:
|
||||||
php-version: ${{ matrix.php-version }}
|
php-version: ${{ matrix.php-version }}
|
||||||
extensions: ${{ env.extensions }}
|
extensions: ${{ env.extensions }}
|
||||||
key: tests-extensions-${{ inputs.test-group }}
|
key: tests-extensions-${{ matrix.php-version }}-${{ inputs.test-group }}
|
||||||
- name: Cache extensions
|
- name: Cache extensions
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
|
|
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
|
@ -26,7 +26,7 @@ jobs:
|
||||||
with:
|
with:
|
||||||
php-version: ${{ matrix.php-version }}
|
php-version: ${{ matrix.php-version }}
|
||||||
extensions: ${{ env.extensions }}
|
extensions: ${{ env.extensions }}
|
||||||
key: tests-extensions-${{ matrix.command }}
|
key: tests-extensions-${{ matrix.php-version }}-${{ matrix.command }}
|
||||||
- name: Cache extensions
|
- name: Cache extensions
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
|
|
17
.github/workflows/publish-release.yml
vendored
17
.github/workflows/publish-release.yml
vendored
|
@ -12,15 +12,30 @@ jobs:
|
||||||
matrix:
|
matrix:
|
||||||
php-version: ['8.1']
|
php-version: ['8.1']
|
||||||
swoole: ['yes', 'no']
|
swoole: ['yes', 'no']
|
||||||
|
env:
|
||||||
|
extensions: openswoole-4.11.1
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
- name: Setup cache environment
|
||||||
|
id: extcache
|
||||||
|
uses: shivammathur/cache-extensions@v1
|
||||||
|
with:
|
||||||
|
php-version: ${{ matrix.php-version }}
|
||||||
|
extensions: ${{ env.extensions }}
|
||||||
|
key: publish-release-extensions-${{ matrix.php-version }}-${{ matrix.swoole }}
|
||||||
|
- name: Cache extensions
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: ${{ steps.extcache.outputs.dir }}
|
||||||
|
key: ${{ steps.extcache.outputs.key }}
|
||||||
|
restore-keys: ${{ steps.extcache.outputs.key }}
|
||||||
- name: Use PHP
|
- name: Use PHP
|
||||||
uses: shivammathur/setup-php@v2
|
uses: shivammathur/setup-php@v2
|
||||||
with:
|
with:
|
||||||
php-version: ${{ matrix.php-version }}
|
php-version: ${{ matrix.php-version }}
|
||||||
tools: composer
|
tools: composer
|
||||||
extensions: openswoole-4.11.1
|
extensions: ${{ env.extensions }}
|
||||||
- if: ${{ matrix.swoole == 'yes' }}
|
- if: ${{ matrix.swoole == 'yes' }}
|
||||||
run: ./build.sh ${GITHUB_REF#refs/tags/v}
|
run: ./build.sh ${GITHUB_REF#refs/tags/v}
|
||||||
- if: ${{ matrix.swoole == 'no' }}
|
- if: ${{ matrix.swoole == 'no' }}
|
||||||
|
|
17
.github/workflows/publish-swagger-spec.yml
vendored
17
.github/workflows/publish-swagger-spec.yml
vendored
|
@ -11,6 +11,8 @@ jobs:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
php-version: ['8.1']
|
php-version: ['8.1']
|
||||||
|
env:
|
||||||
|
extensions: openswoole-4.11.1
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
@ -18,12 +20,25 @@ jobs:
|
||||||
id: determine_version
|
id: determine_version
|
||||||
run: echo "::set-output name=version::${GITHUB_REF#refs/tags/}"
|
run: echo "::set-output name=version::${GITHUB_REF#refs/tags/}"
|
||||||
shell: bash
|
shell: bash
|
||||||
|
- name: Setup cache environment
|
||||||
|
id: extcache
|
||||||
|
uses: shivammathur/cache-extensions@v1
|
||||||
|
with:
|
||||||
|
php-version: ${{ matrix.php-version }}
|
||||||
|
extensions: ${{ env.extensions }}
|
||||||
|
key: publish-release-extensions-${{ matrix.php-version }}
|
||||||
|
- name: Cache extensions
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: ${{ steps.extcache.outputs.dir }}
|
||||||
|
key: ${{ steps.extcache.outputs.key }}
|
||||||
|
restore-keys: ${{ steps.extcache.outputs.key }}
|
||||||
- name: Use PHP
|
- name: Use PHP
|
||||||
uses: shivammathur/setup-php@v2
|
uses: shivammathur/setup-php@v2
|
||||||
with:
|
with:
|
||||||
php-version: ${{ matrix.php-version }}
|
php-version: ${{ matrix.php-version }}
|
||||||
tools: composer
|
tools: composer
|
||||||
extensions: openswoole-4.11.1
|
extensions: ${{ env.extensions }}
|
||||||
coverage: none
|
coverage: none
|
||||||
- run: composer install --no-interaction --prefer-dist
|
- run: composer install --no-interaction --prefer-dist
|
||||||
- run: composer swagger:inline
|
- run: composer swagger:inline
|
||||||
|
|
Loading…
Reference in a new issue