diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index 5f3c47d..f8cdef2 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -18,21 +18,21 @@ jobs: with: php-version: ${{ matrix.php-versions }} - - name: Validate composer.json and composer.lock - run: composer validate - - - name: Cache Composer packages + - name: Get Composer Cache Directory id: composer-cache - uses: actions/cache@v2 + run: | + echo "::set-output name=dir::$(composer config cache-files-dir)" + + - uses: actions/cache@v2 with: - path: vendor - key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} + path: ${{ steps.composer-cache.outputs.dir }} + key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} restore-keys: | - ${{ runner.os }}-php- + ${{ runner.os }}-composer- - name: Install dependencies if: steps.composer-cache.outputs.cache-hit != 'true' - run: composer install --prefer-dist --no-progress --no-suggest + run: composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader - name: Run test suite run: composer run-script test