Skip to content

Commit 00ab580

Browse files
committed
chore(workflows): cache composer dependencies in tests
1 parent 9c82273 commit 00ab580

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

.github/workflows/run-tests.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,18 @@ jobs:
2828
run: |
2929
composer config github-oauth.github.com ${{ secrets.TOKEN_GITHUB }}
3030
31+
- name: ✨ Get Composer cache directory
32+
id: composer-cache
33+
run: echo "dir=$(composer config cache-files-dir)" >> "$GITHUB_OUTPUT"
34+
35+
- name: 📦 Set up Composer dependency caching
36+
uses: actions/cache@v4
37+
with:
38+
path: ${{ steps.composer-cache.outputs.dir }}
39+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
40+
restore-keys: |
41+
${{ runner.os }}-composer-
42+
3143
- name: ⬇️Install Composer dependencies
3244
run: composer validate --no-check-publish && composer install --prefer-dist --no-progress --no-ansi --no-interaction --optimize-autoloader
3345

0 commit comments

Comments
 (0)