Enhance CI workflow by adding PHP setup step and caching for vendor directory
This commit is contained in:
13
.github/workflows/ci.yml
vendored
13
.github/workflows/ci.yml
vendored
@@ -34,6 +34,7 @@ jobs:
|
|||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Setup PHP
|
- name: Setup PHP
|
||||||
|
id: setup-php
|
||||||
uses: shivammathur/setup-php@v2
|
uses: shivammathur/setup-php@v2
|
||||||
with:
|
with:
|
||||||
php-version: '8.2'
|
php-version: '8.2'
|
||||||
@@ -55,8 +56,20 @@ jobs:
|
|||||||
restore-keys: |
|
restore-keys: |
|
||||||
composer-${{ runner.os }}-
|
composer-${{ runner.os }}-
|
||||||
|
|
||||||
|
- name: Cache vendor directory
|
||||||
|
id: cache-vendor
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: vendor
|
||||||
|
key: vendor-${{ runner.os }}-${{ steps.setup-php.outputs.php-version }}-${{ hashFiles('**/composer.lock') }}
|
||||||
|
restore-keys: |
|
||||||
|
vendor-${{ runner.os }}-${{ steps.setup-php.outputs.php-version }}-
|
||||||
|
|
||||||
- name: Install Composer dependencies
|
- name: Install Composer dependencies
|
||||||
run: composer install --prefer-dist --no-interaction --no-progress
|
run: composer install --prefer-dist --no-interaction --no-progress
|
||||||
|
env:
|
||||||
|
COMPOSER_NO_INTERACTION: 1
|
||||||
|
COMPOSER_MEMORY_LIMIT: -1
|
||||||
|
|
||||||
- name: Prepare SQLite database
|
- name: Prepare SQLite database
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
Reference in New Issue
Block a user