Skip to content

Commit

Permalink
Merge pull request #1828 from nelmio/CACHE
Browse files Browse the repository at this point in the history
Change the management of the cache of composer
  • Loading branch information
GuilhemN authored Jun 7, 2021
2 parents 5808651 + ce6ed1e commit 6e7d681
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ on:

env:
fail-fast: true
COMPOSER_ROOT_VERSION: "1.4"

jobs:
phpunit:
Expand Down Expand Up @@ -48,14 +47,19 @@ jobs:
uses: "shivammathur/setup-php@v2"
with:
php-version: "${{ matrix.php-version }}"
tools: composer
coverage: "none"

- name: "Cache dependencies installed with composer"
uses: "actions/cache@v2"
- name: Get composer cache directory
id: composercache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

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

- name: "Install dependencies with composer"
env:
Expand Down

0 comments on commit 6e7d681

Please sign in to comment.