diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index 5cce40fc..ef51a559 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -29,6 +29,20 @@ jobs: coverage: none extensions: sockets + - name: Get Composer cache directory + id: composer-cache + shell: bash + run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT + + - name: Cache Composer dependencies + uses: actions/cache@v4 + with: + path: ${{ steps.composer-cache.outputs.dir }} + key: static-php-8.3-${{ matrix.dependency-version }}-composer-${{ hashFiles('**/composer.json') }} + restore-keys: | + static-php-8.3-${{ matrix.dependency-version }}-composer- + static-php-8.3-composer- + - name: Install Dependencies run: composer update --prefer-stable --no-interaction --no-progress --ansi diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 8ab19811..a0c1ee2c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -34,6 +34,20 @@ jobs: coverage: none extensions: sockets + - name: Get Composer cache directory + id: composer-cache + shell: bash + run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT + + - name: Cache Composer dependencies + uses: actions/cache@v4 + with: + path: ${{ steps.composer-cache.outputs.dir }} + key: ${{ matrix.os }}-php-${{ matrix.php }}-symfony-${{ matrix.symfony }}-composer-${{ hashFiles('**/composer.json') }} + restore-keys: | + ${{ matrix.os }}-php-${{ matrix.php }}-symfony-${{ matrix.symfony }}-composer- + ${{ matrix.os }}-php-${{ matrix.php }}-composer- + - name: Setup Problem Matches run: | echo "::add-matcher::${{ runner.tool_cache }}/php.json"