From ce6ed1ee80b2daa730685900ba09335db21a40a5 Mon Sep 17 00:00:00 2001 From: Guilhem Niot Date: Mon, 7 Jun 2021 18:52:44 +0200 Subject: [PATCH] Change the management of the cache of composer --- .github/workflows/continuous-integration.yml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index c270aa9..5500844 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -15,7 +15,6 @@ on: env: fail-fast: true - COMPOSER_ROOT_VERSION: "1.4" jobs: phpunit: @@ -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: