Skip to content

Commit 02474dd

Browse files
committed
Added cache for composer in github actions
1 parent 997385c commit 02474dd

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

.github/workflows/test.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,17 @@ jobs:
3737
with:
3838
stack-version: ${{ matrix.es-version }}
3939

40+
- name: Get composer cache directory
41+
id: composercache
42+
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
43+
44+
- name: Cache dependencies
45+
uses: actions/cache@v2
46+
with:
47+
path: ${{ steps.composercache.outputs.dir }}
48+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
49+
restore-keys: ${{ runner.os }}-composer-
50+
4051
- name: Install dependencies
4152
run: |
4253
composer install --prefer-dist

0 commit comments

Comments
 (0)