From 078e862c47d5a80b4cc656ca143bffd6c5865225 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Sun, 22 Jan 2023 09:49:47 +1100 Subject: [PATCH] Change caching strategies for github actions --- .github/workflows/phpunit.yml | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/phpunit.yml b/.github/workflows/phpunit.yml index 5112b4f9ef94..1837451eead7 100644 --- a/.github/workflows/phpunit.yml +++ b/.github/workflows/phpunit.yml @@ -90,22 +90,22 @@ jobs: run: | cp .env.ci .env - # - name: Get Composer Cache Directory - # id: composer-cache - # run: | - # echo "::set-output name=dir::$(composer config cache-files-dir)" - # - uses: actions/cache@v2 - # with: - # path: ${{ steps.composer-cache.outputs.dir }} - # key: ${{ runner.os }}-${{ matrix.php }}-composer-${{ hashFiles('**/composer.lock') }} - # restore-keys: | - # ${{ runner.os }}-${{ matrix.php }}-composer- - - - name: Cache dependencies actions/cache@v3 - uses: actions/cache@v3 + - name: Get Composer Cache Directory + id: composer-cache + run: | + echo "::set-output name=dir::$(composer config cache-files-dir)" + - uses: actions/cache@v2 with: - path: ~/.composer/cache/files - key: dependencies-${{ matrix.dependency-version }}-laravel-${{ matrix.laravel }}-php-${{ matrix.php-versions }}-composer-${{ hashFiles('composer.json') }} + path: ${{ steps.composer-cache.outputs.dir }} + key: ${{ runner.os }}-${{ matrix.php }}-composer-${{ hashFiles('**/composer.lock') }} + restore-keys: | + ${{ runner.os }}-${{ matrix.php }}-composer- + + # - name: Cache dependencies actions/cache@v3 + # uses: actions/cache@v3 + # with: + # path: ~/.composer/cache/files + # key: dependencies-${{ matrix.dependency-version }}-laravel-${{ matrix.laravel }}-php-${{ matrix.php-versions }}-composer-${{ hashFiles('composer.json') }} - name: Install composer dependencies run: |