From bb8065ade1ae1ad82016a4855e6edefdebb41cb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Goetz?= Date: Thu, 14 Nov 2019 08:30:21 +0100 Subject: [PATCH] Use vendors caching correctly --- .github/workflows/php.yml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index 601533d..b392ade 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -7,7 +7,8 @@ jobs: strategy: max-parallel: 15 matrix: - operating-system: [ubuntu-latest, windows-latest, macOS-latest] + # TODO : enable tests on windows + operating-system: [ubuntu-latest, macOS-latest] php-versions: ['7.1', '7.2', '7.3'] name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }} @@ -23,18 +24,19 @@ jobs: extension-csv: mbstring, xdebug coverage: xdebug + - name: Get Composer Cache Directory + id: composer-cache + run: echo "::set-output name=dir::$(composer config cache-files-dir)" + - name: Validate composer.json and composer.lock run: composer validate - name: Cache vendor uses: actions/cache@v1 with: - path: node_modules - key: ${{ runner.OS }}-build-${{ matrix.php-versions }}-${{ hashFiles('**/composer.lock') }} - restore-keys: | - ${{ runner.OS }}-build-${{ matrix.php-versions }}-${{ env.cache-name }}- - ${{ runner.OS }}-build-${{ matrix.php-versions }}- - ${{ runner.OS }}-build- + path: ${{ steps.composer-cache.outputs.dir }} + key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} + restore-keys: ${{ runner.os }}-composer- - name: Install dependencies run: composer install --prefer-dist --no-progress --no-suggest