diff --git a/.github/actions/e2e/env-setup/action.yml b/.github/actions/e2e/env-setup/action.yml index e1dbd310239..0296fc6eea3 100644 --- a/.github/actions/e2e/env-setup/action.yml +++ b/.github/actions/e2e/env-setup/action.yml @@ -30,7 +30,7 @@ runs: uses: actions/cache@v4 with: path: ./vendor - key: ${{ runner.os }}-vendor-${{ hashFiles('composer.lock') }} + key: ${{ runner.os }}-composer-${{ hashFiles('composer.json') }}-${{ hashFiles('composer.lock') }} # Cache node dependencies - name: Cache node dependencies diff --git a/.github/actions/setup-repo/action.yml b/.github/actions/setup-repo/action.yml index d8de18c7d8d..2e1098a6d19 100644 --- a/.github/actions/setup-repo/action.yml +++ b/.github/actions/setup-repo/action.yml @@ -14,7 +14,7 @@ runs: uses: actions/cache@v4 with: path: ~/.cache/composer/ - key: ${{ runner.os }}-composer-${{ hashFiles('composer.lock') }} + key: ${{ runner.os }}-composer-${{ hashFiles('composer.json') }}-${{ hashFiles('composer.lock') }} - name: "Set up PHP" uses: ./.github/actions/setup-php diff --git a/.github/workflows/check-changelog.yml b/.github/workflows/check-changelog.yml index 682710edbdd..3aa3936ca64 100644 --- a/.github/workflows/check-changelog.yml +++ b/.github/workflows/check-changelog.yml @@ -22,7 +22,7 @@ jobs: uses: actions/cache@v4 with: path: ~/.cache/composer/ - key: ${{ runner.os }}-composer-${{ hashFiles('composer.lock') }} + key: ${{ runner.os }}-composer-${{ hashFiles('composer.json') }}-${{ hashFiles('composer.lock') }} # setup PHP, but without debug extensions for reasonable performance - name: "Set up PHP" uses: ./.github/actions/setup-php diff --git a/.github/workflows/compatibility.yml b/.github/workflows/compatibility.yml index 02a2d7d4c7e..e1b7279b70f 100644 --- a/.github/workflows/compatibility.yml +++ b/.github/workflows/compatibility.yml @@ -45,7 +45,7 @@ jobs: - uses: actions/cache@v4 with: path: ~/.cache/composer/ - key: ${{ runner.os }}-composer-${{ hashFiles('composer.lock') }} + key: ${{ runner.os }}-composer-${{ hashFiles('composer.json') }}-${{ hashFiles('composer.lock') }} # setup PHP, but without debug extensions for reasonable performance - uses: shivammathur/setup-php@v2 with: @@ -54,7 +54,7 @@ jobs: coverage: none # run CI checks - run: bash bin/run-ci-tests.bash - + generate-wc-compat-beta-matrix: name: "Generate the matrix for compatibility-woocommerce-beta dynamically" runs-on: ubuntu-latest @@ -86,7 +86,7 @@ jobs: - uses: actions/cache@v4 with: path: ~/.cache/composer/ - key: ${{ runner.os }}-composer-${{ hashFiles('composer.lock') }} + key: ${{ runner.os }}-composer-${{ hashFiles('composer.json') }}-${{ hashFiles('composer.lock') }} # setup PHP, but without debug extensions for reasonable performance - uses: shivammathur/setup-php@v2 with: diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 79ff0d7a01f..1728e6f9fee 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -30,7 +30,7 @@ jobs: - uses: actions/cache@v4 with: path: ~/.cache/composer/ - key: ${{ runner.os }}-composer-${{ hashFiles('composer.lock') }} + key: ${{ runner.os }}-composer-${{ hashFiles('composer.json') }}-${{ hashFiles('composer.lock') }} # setup PHP, but without debug extensions for reasonable performance - uses: shivammathur/setup-php@v2 with: diff --git a/.github/workflows/i18n-weekly-release.yml b/.github/workflows/i18n-weekly-release.yml index 2c7f0fa0396..bd87284be4e 100644 --- a/.github/workflows/i18n-weekly-release.yml +++ b/.github/workflows/i18n-weekly-release.yml @@ -21,7 +21,7 @@ jobs: - uses: actions/cache@v4 with: path: ~/.cache/composer/ - key: ${{ runner.os }}-composer-${{ hashFiles('composer.lock') }} + key: ${{ runner.os }}-composer-${{ hashFiles('composer.json') }}-${{ hashFiles('composer.lock') }} - uses: actions/cache@v4 with: path: ~/.npm/ @@ -33,7 +33,7 @@ jobs: run: | npm ci npm run build - + if [[ ! -f woocommerce-payments.zip ]]; then echo "Failed to create release zip" exit 1 diff --git a/.github/workflows/js-lint-test.yml b/.github/workflows/js-lint-test.yml index b3797f4dae0..461984d93da 100644 --- a/.github/workflows/js-lint-test.yml +++ b/.github/workflows/js-lint-test.yml @@ -22,7 +22,7 @@ jobs: - uses: actions/cache@v4 with: path: ~/.cache/composer/ - key: ${{ runner.os }}-composer-${{ hashFiles('composer.lock') }} + key: ${{ runner.os }}-composer-${{ hashFiles('composer.json') }}-${{ hashFiles('composer.lock') }} - uses: actions/cache@v4 with: path: ~/.npm/ diff --git a/.github/workflows/php-lint-test.yml b/.github/workflows/php-lint-test.yml index de15390609e..3d4ca36b9ed 100644 --- a/.github/workflows/php-lint-test.yml +++ b/.github/workflows/php-lint-test.yml @@ -25,7 +25,7 @@ jobs: - uses: actions/cache@v4 with: path: ~/.cache/composer/ - key: ${{ runner.os }}-composer-${{ hashFiles('composer.lock') }} + key: ${{ runner.os }}-composer-${{ hashFiles('composer.json') }}-${{ hashFiles('composer.lock') }} # setup PHP, but without debug extensions for reasonable performance - name: "Set up PHP" uses: ./.github/actions/setup-php @@ -59,7 +59,7 @@ jobs: - uses: actions/cache@v4 with: path: ~/.cache/composer/ - key: ${{ runner.os }}-composer-${{ hashFiles('composer.lock') }} + key: ${{ runner.os }}-composer-${{ hashFiles('composer.json') }}-${{ hashFiles('composer.lock') }} - uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php }} diff --git a/changelog/gh-actions-e2e-optimize-composer-cache b/changelog/gh-actions-e2e-optimize-composer-cache new file mode 100644 index 00000000000..1e618c2233a --- /dev/null +++ b/changelog/gh-actions-e2e-optimize-composer-cache @@ -0,0 +1,5 @@ +Significance: patch +Type: dev +Comment: Updates gh actions cache-key for composer dependencies. + +