From 22407333417b32f82e47189f44af6c9c12ffc3bf Mon Sep 17 00:00:00 2001 From: Anatoliy Melnikov <5785276@gmail.com> Date: Sun, 28 Jul 2024 22:55:49 +0300 Subject: [PATCH] Refactor installation of tools with PHIVE --- .github/workflows/automated_testing.yml | 28 ++++++++++++++++++------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/.github/workflows/automated_testing.yml b/.github/workflows/automated_testing.yml index bb8c3cc..f1c2552 100644 --- a/.github/workflows/automated_testing.yml +++ b/.github/workflows/automated_testing.yml @@ -37,9 +37,8 @@ jobs: uses: actions/cache@v4 with: path: vendor - key: "${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}" - restore-keys: | - ${{ runner.os }}-php- + key: "php-${{ runner.php-version }}-composer-${{ hashFiles('**/composer.lock') }}" + restore-keys: "php-${{ runner.php-version }}-composer-" - name: Install dependencies uses: ramsey/composer-install@v3 @@ -63,18 +62,31 @@ jobs: uses: actions/cache@v4 with: path: vendor - key: "${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}" - restore-keys: | - ${{ runner.os }}-php- + key: "php-${{ runner.php-version }}-composer-${{ hashFiles('**/composer.lock') }}" + restore-keys: "php-${{ runner.php-version }}-composer-" - name: Install dependencies uses: ramsey/composer-install@v3 + - name: Cache tools installed with PHIVE + uses: actions/cache@v4 + with: + path: "${{ runner.temp }}/.phive" + key: "php-${{ runner.php-version }}-phive-${{ hashFiles('.phive/phars.xml') }}" + restore-keys: "php-${{ runner.php-version }}-phive-" + - name: Install PHIVE uses: szepeviktor/phive@v1 + with: + home: "${{ runner.temp }}/.phive" + binPath: "${{ github.workspace }}/tools/phive" - - name: Install PHPUnit with PHIVE - run: ./tools/phive --no-progress install --trust-gpg-keys 4AA394086372C20A phpunit + - name: Install PHP tools with PHIVE + uses: szepeviktor/phive-install@v1 + with: + home: "${{ runner.temp }}/.phive" + binPath: "${{ github.workspace }}/tools/phive" + trustGpgKeys: "4AA394086372C20A" - name: 'Run all PHPUnit tests' run: composer run phpunit