Skip to content
This repository has been archived by the owner on Nov 30, 2022. It is now read-only.

Commit

Permalink
Cache composer dependencies (#824)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasmichot authored Jun 23, 2021
1 parent 65b1ce2 commit bbdfcbf
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
name: PHP ${{ matrix.php }} / Laravel ${{ matrix.laravel }}

steps:
- name: Checkout
- name: Checkout the code
uses: actions/checkout@v2

- name: Setup PHP
Expand All @@ -40,6 +40,17 @@ jobs:
if: matrix.php == '8.0' && matrix.laravel == '8.22'
run: composer validate --strict

- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: Cache composer dependencies
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: "php-${{ matrix.php }}-laravel-${{ matrix.laravel }}-${{ hashFiles('**/composer.json') }}"
restore-keys: "php-${{ matrix.php }}-laravel-${{ matrix.laravel }}-${{ hashFiles('**/composer.json') }}"

- name: Install Laravel legacy factories support
if: matrix.laravel == '8.22'
run: composer require "laravel/legacy-factories:^1.0" --no-interaction --no-update
Expand Down

0 comments on commit bbdfcbf

Please sign in to comment.